Function at 0x40d762
Capabilities:
Query environment variable

Disassembly:
push ebp
sub esp, 0x81c
lea ebp, [esp - 4]
mov eax, dword [0x489218]
xor eax, ebp
mov dword [ebp + 0x81c], eax
push 0xb8
mov eax, 0x4712dc
call fcn.00459800
mov edi, ecx
cmp dword [edi + 0x18], 8
mov dword [ebp - 0x14], edi
jb 0x40d79b
add edi, 4
mov eax, dword [edi]
jmp 0x40d7a0
add edi, 4
mov eax, edi
mov ebx, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov esi, 0x400
push esi
lea ecx, [ebp + 0x1c]
push ecx
push eax
call ebx
mov dword [ebp - 0x20], eax
cmp eax, esi
jbe 0x40db48
xor ecx, ecx
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00453a19
xor esi, esi
pop ecx
mov dword [ebp - 0x1c], eax
cmp eax, esi
jne 0x40d95a
call fcn.0040a3c3
cmp byte [eax], 0
jne 0x40d845
lea eax, [ebp - 0xc4]
push eax
call fcn.00408287
lea eax, [ebp - 0xbc]
push str.CSystemCommands::ReplaceEnvVariables___failed_to_allocate_memory.
push eax
mov dword [ebp - 4], esi
call fcn.00406795
pop ecx
pop ecx
lea eax, [ebp]
push eax
lea ecx, [ebp - 0xc4]
call fcn.0040677b
lea edi, [ebp]
mov byte [ebp - 4], 1
call fcn.004064f6
push esi
push 1
mov esi, edi
call fcn.0040866c
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0xc4]
call fcn.00406bd8
jmp 0x40db54
lea eax, [ebp - 0xbc]
push eax
mov dword [ebp - 4], 2
call fcn.004063dd
mov byte [ebp - 4], 3
call fcn.0040a3c3
lea ecx, [ebp - 0x3c]
call fcn.004062f3
mov byte [ebp - 4], 4
cmp dword [eax + 0x18], 8
jb 0x40d878
mov edi, dword [eax + 4]
jmp 0x40d87b
lea edi, [eax + 4]
lea eax, [ebp - 0xbc]
push 0x479278
push eax
call fcn.00406795
pop ecx
pop ecx
push edi
push eax
call fcn.00406795
pop ecx
pop ecx
push 0x479270
push eax
call fcn.00406795
pop ecx
pop ecx
push str.CSystemCommands::ReplaceEnvVariables___failed_to_allocate_memory.
push eax
call fcn.00406795
pop ecx
pop ecx
push esi
push 1
lea esi, [ebp - 0x3c]
mov byte [ebp - 4], 3
call fcn.0040866c
lea eax, [ebp - 0x18]
push eax
call sub.log4cplusU.dll_public:_static_class_log4cplus::Logger___cdecl_log4cplus::Logger::getRoot_void_
pop ecx
mov esi, 0x2710
push esi
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 5
call sub.log4cplusU.dll_public:_bool___thiscall_log4cplus::Logger::isEnabledFor_int_const
test al, al
je 0x40d913
lea eax, [ebp - 0x3c]
push eax
lea ecx, [ebp - 0xbc]
call fcn.004062d9
push 0x4d2
push str..SystemCommands.cpp
push eax
push esi
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 6
call sub.log4cplusU.dll_public:_void___thiscall_log4cplus::Logger::forcedLog_int__class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const___char_const___int_const
push 0
push 1
lea esi, [ebp - 0x3c]
call fcn.0040866c
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 3
call sub.log4cplusU.dll_public_virtual:_void___thiscall_log4cplus::Logger::destructor_void_
lea eax, [ebp - 0xbc]
mov byte [ebp - 4], 2
call fcn.00406348
jmp 0x40d840
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov esi, dword [ebp - 0x14]
cmp dword [esi + 0x18], 8
jb 0x40d96c
mov edi, dword [edi]
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push edi
call ebx
cmp eax, dword [ebp - 0x20]
jbe 0x40db34
call fcn.0040a3c3
cmp byte [eax], 0
jne 0x40da02
lea eax, [ebp - 0xc4]
push eax
call fcn.00408287
mov dword [ebp - 4], 9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4792c8
lea eax, [ebp - 0xbc]
push str.CSystemCommands::ReplaceEnvVariables___failed_to_expand
push eax
call fcn.00406795
pop ecx
pop ecx
push eax
call fcn.00406795
pop ecx
pop ecx
push eax
call fcn.0040ed63
lea eax, [ebp]
push eax
lea ecx, [ebp - 0xc4]
call fcn.0040677b
lea edi, [ebp]
mov byte [ebp - 4], 0xa
call fcn.004064f6
push 0
push 1
mov esi, edi
call fcn.0040866c
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0xc4]
call fcn.00406bd8
jmp 0x40db3d
lea eax, [ebp - 0xbc]
push eax
mov dword [ebp - 4], 0xb
call fcn.004063dd
mov byte [ebp - 4], 0xc
call fcn.0040a3c3
lea ecx, [ebp - 0x3c]
call fcn.004062f3
mov byte [ebp - 4], 0xd
cmp dword [eax + 0x18], 8
jb 0x40da35
mov edi, dword [eax + 4]
jmp 0x40da38
lea edi, [eax + 4]
lea eax, [ebp - 0xbc]
push 0x479278
push eax
call fcn.00406795
pop ecx
pop ecx
push edi
push eax
call fcn.00406795
pop ecx
pop ecx
push 0x479270
push eax
call fcn.00406795
pop ecx
pop ecx
push str.CSystemCommands::ReplaceEnvVariables___failed_to_expand
push eax
call fcn.00406795
pop ecx
pop ecx
push 0x4792c8
push eax
call fcn.00406795
pop ecx
pop ecx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
call fcn.0040ed63
push 0
push 1
lea esi, [ebp - 0x3c]
mov byte [ebp - 4], 0xc
call fcn.0040866c
lea eax, [ebp - 0x18]
push eax
call sub.log4cplusU.dll_public:_static_class_log4cplus::Logger___cdecl_log4cplus::Logger::getRoot_void_
pop ecx
mov esi, 0x2710
push esi
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 0xe
call sub.log4cplusU.dll_public:_bool___thiscall_log4cplus::Logger::isEnabledFor_int_const
test al, al
je 0x40daed
lea eax, [ebp - 0x3c]
push eax
lea ecx, [ebp - 0xbc]
call fcn.004062d9
push 0x4d8
push str..SystemCommands.cpp
push eax
push esi
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 0xf
call sub.log4cplusU.dll_public:_void___thiscall_log4cplus::Logger::forcedLog_int__class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const___char_const___int_const
push 0
push 1
lea esi, [ebp - 0x3c]
call fcn.0040866c
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 0xc
call sub.log4cplusU.dll_public_virtual:_void___thiscall_log4cplus::Logger::destructor_void_
lea eax, [ebp - 0xbc]
mov byte [ebp - 4], 0xb
call fcn.00406348
jmp 0x40d9fd
push dword [ebp - 0x1c]
push esi
call fcn.00406295
push dword [ebp - 0x1c]
call fcn.00456056
pop ecx
jmp 0x40db54
lea eax, [ebp + 0x1c]
push eax
push dword [ebp - 0x14]
call fcn.00406295
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x81c]
xor ecx, ebp
call fcn.0045509c
add ebp, 0x820
leave
ret