Function at 0x407293
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x878
mov eax, dword [0x4163c0]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
xor esi, esi
push edi
mov edi, ecx
mov dword [ebp - 0x850], edi
mov dword [ebp - 0x84c], eax
mov dword [ebp - 0x848], esi
mov dword [ebp - 0x874], 0x4026c4
mov dword [ebp - 0x870], esi
mov dword [ebp - 0x868], esi
mov dword [ebp - 0x864], esi
mov dword [ebp - 0x860], 0x2000
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [ebp - 0x86c], eax
lea eax, [ebp - 0x870]
push eax
mov eax, edi
mov dword [ebp - 0x858], esi
mov dword [ebp - 0x844], esi
call fcn.00406183
mov ecx, dword [ebp - 0x870]
mov dword [ebp - 0x85c], ecx
cmp eax, esi
jmp 0x4074f9
push 0x403e88
push dword [ebp - 0x844]
call fcn.0040c8f2
pop ecx
pop ecx
cmp eax, dword [ebp - 0x844]
jne 0x4074df
xor eax, eax
push 0x208
mov word [ebp - 0x83c], ax
lea eax, [ebp - 0x83a]
push esi
push eax
call fcn.0040f1a0
xor eax, eax
mov edi, 0x206
push edi
mov word [ebp - 0x424], ax
lea eax, [ebp - 0x422]
push esi
push eax
call fcn.0040f1a0
xor eax, eax
push edi
mov word [ebp - 0x21c], ax
lea eax, [ebp - 0x21a]
push esi
push eax
call fcn.0040f1a0
lea eax, [ebp - 0x840]
push eax
mov edi, 0x403e9c
push edi
push dword [ebp - 0x844]
mov dword [ebp - 0x854], esi
mov dword [ebp - 0x840], esi
call fcn.0040c958
lea eax, [ebp - 0x840]
push eax
push edi
push esi
call fcn.0040c958
lea eax, [ebp - 0x840]
push eax
mov edi, 0x403eac
push edi
push esi
call fcn.0040c958
add esp, 0x48
lea eax, [ebp - 0x840]
push eax
push edi
push esi
call fcn.0040c958
lea eax, [ebp - 0x840]
push eax
push edi
push esi
call fcn.0040c958
lea eax, [ebp - 0x840]
push eax
push edi
push esi
call fcn.0040c958
add esp, 0x24
mov ebx, 0x104
push ebx
lea ecx, [ebp - 0x83c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
xor eax, eax
mov word [ebp - 0x10], ax
lea edi, [ebp - 0xe]
push 0x206
stosd dword es:[edi], eax
mov word [ebp - 0x62c], ax
lea eax, [ebp - 0x62a]
push esi
push eax
call fcn.0040f1a0
push esi
push esi
push esi
push esi
push ebx
lea eax, [ebp - 0x62c]
push eax
push 3
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x850]
call fcn.0040c357
push esi
push esi
lea eax, [ebp - 0x62c]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x424]
push ebx
push eax
call fcn.0040c57c
add esp, 0x48
lea ebx, [ebp - 0x424]
call fcn.0040658d
lea eax, [ebp - 0x83c]
push eax
mov eax, ebx
call fcn.00405f7c
lea eax, [ebp - 0x854]
push eax
lea eax, [ebp - 0x21c]
push eax
push 0x104
mov eax, ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
push 0x103
lea eax, [ebp - 0x21c]
push eax
push eax
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
push dword [ebp - 0x84c]
lea eax, [ebp - 0x21c]
push eax
call fcn.0040c2bf
pop ecx
pop ecx
test eax, eax
jne 0x4074df
mov dword [ebp - 0x848], 1
push dword [ebp - 0x844]
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp - 0x848], esi
jne 0x407516
lea eax, [ebp - 0x844]
push eax
lea eax, [ebp - 0x874]
push eax
call fcn.004064ae
test eax, eax
jne 0x407323
lea ecx, [ebp - 0x874]
call fcn.00406488
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x848]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040bb7c
leave
ret 4