; ; copy_environment from 0x18013b4d4 to 0x18013b5c3 (239 bytes) ; ; 3 xrefs: ; > common_set_variable_in_environment_nolock @ 0x18013b13e ; > common_set_variable_in_environment_nolock @ 0x18013b18c ; > @ 0x1802038f0 ; ; This function is hookable on this platform! ; ; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA ; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings ; mov rax, rsp ; +0x0, 0x18013b4d4 mov [rax+8], rbx ; +0x3, 0x18013b4d7 mov [rax+10h], rbp ; +0x7, 0x18013b4db mov [rax+18h], rsi ; +0xb, 0x18013b4df mov [rax+20h], rdi ; +0xf, 0x18013b4e3 push r14 ; +0x13, 0x18013b4e7 sub rsp, 30h ; +0x15, 0x18013b4e9 xor ebp, ebp ; +0x19, 0x18013b4ed mov rdi, rcx ; +0x1b, 0x18013b4ef test rcx, rcx ; +0x1e, 0x18013b4f2 jnz short loc_18013B514 ; +0x21, 0x18013b4f5 xor eax, eax ; +0x23, 0x18013b4f7 mov rbx, [rsp+38h+arg_0] ; +0x25, 0x18013b4f9 mov rbp, [rsp+38h+arg_8] ; +0x2a, 0x18013b4fe mov rsi, [rsp+38h+arg_10] ; +0x2f, 0x18013b503 mov rdi, [rsp+38h+arg_18] ; +0x34, 0x18013b508 add rsp, 30h ; +0x39, 0x18013b50d pop r14 ; +0x3d, 0x18013b511 retn ; +0x3f, 0x18013b513 mov rcx, rbp ; +0x40, 0x18013b514 mov rax, rdi ; +0x43, 0x18013b517 cmp [rdi], rbp ; +0x46, 0x18013b51a jz short loc_18013B52B ; +0x49, 0x18013b51d inc rcx ; +0x4b, 0x18013b51f lea rax, [rax+8] ; +0x4e, 0x18013b522 cmp [rax], rbp ; +0x52, 0x18013b526 jnz short loc_18013B51F ; +0x55, 0x18013b529 inc rcx; Count ; +0x57, 0x18013b52b mov edx, 8; Size ; +0x5a, 0x18013b52e call _calloc_base ; +0x5f, 0x18013b533 mov rbx, rax ; +0x64, 0x18013b538 test rax, rax ; +0x67, 0x18013b53b jz short loc_18013B5BD ; +0x6a, 0x18013b53e mov rax, [rdi] ; +0x6c, 0x18013b540 test rax, rax ; +0x6f, 0x18013b543 jz short loc_18013B599 ; +0x72, 0x18013b546 mov r14, rbx ; +0x74, 0x18013b548 sub r14, rdi ; +0x77, 0x18013b54b or rsi, 0FFFFFFFFFFFFFFFFh ; +0x7a, 0x18013b54e inc rsi ; +0x7e, 0x18013b552 cmp [rax+rsi*2], bp ; +0x81, 0x18013b555 jnz short loc_18013B552 ; +0x85, 0x18013b559 mov edx, 2; Size ; +0x87, 0x18013b55b lea rcx, [rsi+1]; Count ; +0x8c, 0x18013b560 call _calloc_base ; +0x90, 0x18013b564 xor ecx, ecx; Block ; +0x95, 0x18013b569 mov [r14+rdi], rax ; +0x97, 0x18013b56b call _free_base ; +0x9b, 0x18013b56f mov rcx, [r14+rdi]; Destination ; +0xa0, 0x18013b574 test rcx, rcx ; +0xa4, 0x18013b578 jz short loc_18013B5BD ; +0xa7, 0x18013b57b mov r8, [rdi]; Source ; +0xa9, 0x18013b57d lea rdx, [rsi+1]; SizeInWords ; +0xac, 0x18013b580 call wcscpy_s ; +0xb0, 0x18013b584 test eax, eax ; +0xb5, 0x18013b589 jnz short loc_18013B5A8 ; +0xb7, 0x18013b58b add rdi, 8 ; +0xb9, 0x18013b58d mov rax, [rdi] ; +0xbd, 0x18013b591 test rax, rax ; +0xc0, 0x18013b594 jnz short loc_18013B54E ; +0xc3, 0x18013b597 xor ecx, ecx; Block ; +0xc5, 0x18013b599 call _free_base ; +0xc7, 0x18013b59b mov rax, rbx ; +0xcc, 0x18013b5a0 jmp loc_18013B4F9 ; +0xcf, 0x18013b5a3 xor r9d, r9d; LineNo ; +0xd4, 0x18013b5a8 mov [rsp+38h+Reserved], rbp; Reserved ; +0xd7, 0x18013b5ab xor r8d, r8d; FileName ; +0xdc, 0x18013b5b0 xor edx, edx; FunctionName ; +0xdf, 0x18013b5b3 xor ecx, ecx; Expression ; +0xe1, 0x18013b5b5 call _invoke_watson ; +0xe3, 0x18013b5b7 db 0CCh ; +0xe8, 0x18013b5bc call abort ; +0xe9, 0x18013b5bd db 0CCh ; +0xee, 0x18013b5c2