Function at 0x10066a00
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x1009fdf0
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push esi
push edi
mov eax, dword [0x10112018]
xor eax, esp
push eax
lea eax, [esp + 0x48]
mov dword fs:[0], eax
mov edi, ecx
mov dword [esp + 0x18], edi
xor ebx, ebx
cmp dword [edi + 0xc], ebx
jne 0x10066c95
lea esi, [esp + 0x2c]
mov dword [edi + 0xc], 1
mov dword [esp + 0x1c], ebx
call fcn.10067800
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], esi
mov dword [esp + 0x50], ebx
cmp byte [edi + 0x22d5], bl
je 0x10066bb3
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov dword [esp + 0x1c], eax
mov edi, eax
cmp word [eax], bx
je 0x10066b6b
call dword [sym.imp.KERNEL32.dll_GetACP]
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push edi
mov ebx, eax
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push eax
mov dword [esp + 0x24], eax
call dword [sym.imp.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_]
add esp, 4
push 0
push 0
mov esi, eax
mov eax, dword [esp + 0x28]
push eax
push esi
push 0xffffffffffffffff
push edi
push 0
push ebx
mov dword [esp + 0x34], esi
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [esp + 0x28], esi
mov eax, esi
mov byte [esp + 0x50], 1
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x10066ad6
mov ebx, dword [esp + 0x3c]
sub eax, ecx
mov dword [esp + 0x20], ebx
lea ebx, [ebx + eax + 1]
lea esi, [esp + 0x2c]
mov dword [esp + 0x24], eax
call fcn.10067880
test eax, eax
jne 0x10066b00
mov dword [esp + 0x30], ebx
mov eax, dword [esp + 0x3c]
cmp ebx, eax
jbe 0x10066b1e
mov ecx, dword [esp + 0x34]
mov edx, ebx
sub edx, eax
push edx
add ecx, eax
push 0
push ecx
call sub.MSVCR100.dll_memset
add esp, 0xc
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x14]
add eax, dword [esp + 0x34]
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x3c], ebx
mov ebx, dword [esp + 0x24]
push ebx
push edx
push eax
mov dword [esp + 0x4c], esi
call dword [sym.imp.MSVCR100.dll_strncpy]
mov eax, dword [esp + 0x20]
add esp, 0xc
push eax
lea edi, [edi + ebx*2 + 2]
mov byte [esp + 0x54], 0
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
cmp word [edi], 0
jne 0x10066a82
mov ebx, dword [esp + 0x3c]
cmp ebx, esi
jne 0x10066b8d
lea ebx, [esi + esi]
lea esi, [esp + 0x2c]
call fcn.10067880
test eax, eax
jne 0x10066b83
mov dword [esp + 0x30], ebx
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x40], ecx
jmp 0x10066b9f
inc ebx
lea esi, [esp + 0x2c]
call fcn.10067880
test eax, eax
jne 0x10066b9f
mov dword [esp + 0x30], ebx
mov eax, dword [esp + 0x3c]
mov ebx, dword [esp + 0x34]
inc eax
mov dword [esp + 0x3c], eax
mov byte [ebx + eax - 1], 0
jmp 0x10066bbb
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
xor edi, edi
cmp byte [ebx], 0
je 0x10066c58
mov ecx, ebx
mov eax, ecx
lea esi, [eax + 1]
lea ecx, [ecx]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x10066bd0
sub eax, esi
mov esi, eax
push esi
push ecx
mov ecx, dword [esp + 0x20]
call sym.ACE.dll_protected:_int___thiscall_ACE_Process_Options::setenv_i_char___unsigned_int_
cmp eax, 0xffffffff
je 0x10066bfa
lea edi, [edi + esi + 1]
cmp byte [edi + ebx], 0
lea ecx, [edi + ebx]
jne 0x10066bc8
jmp 0x10066c58
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call dword [sym.imp.MSVCR100.dll__errno]
mov eax, dword [eax]
test eax, eax
je 0x10066c10
mov esi, eax
call sym.ACE.dll_public:_static_class_ACE_Log_Msg____cdecl_ACE_Log_Msg::instance_void_
push str.ACE_Process_Options::ACE_Process_Options
push str._p._n
push 0x80
push eax
mov byte [eax + 0x13c], 1
mov dword [eax + 0x140], str.Process.cpp
mov dword [eax + 0x144], 0x392
mov dword [eax + 0x148], 0xffffffff
mov dword [eax + 0x14c], esi
call sym.ACE.dll_public:_int___cdecl_ACE_Log_Msg::log_enum_ACE_Log_Priority__char_const__
add esp, 0x10
mov edx, dword [esp + 0x18]
cmp byte [edx + 0x22d5], 0
je 0x10066c72
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x10066c79
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov dword [esp + 0x50], 0xffffffff
mov eax, dword [esp + 0x34]
test eax, eax
je 0x10066c95
mov ecx, dword [esp + 0x38]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 0x10]
call eax
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret