Function at 0x40e4a7
Capabilities:
Query environment variable

Disassembly:
push ebp
sub esp, 0x82c
lea ebp, [esp - 4]
mov eax, dword [0x5ff740]
xor eax, ebp
mov dword [ebp + 0x82c], eax
push 0xc
mov eax, 0x504c69
call fcn.004e3d00
mov esi, ecx
and dword [ebp - 4], 0
lea ebx, [ebp + 0x838]
call fcn.0040db9b
mov ebx, eax
call fcn.0040dbe8
lea eax, [ebp + 0x838]
push eax
mov ecx, esi
call fcn.004025da
xor edi, edi
jmp 0x40e508
movzx eax, word [eax]
cmp ax, 0x22
jne 0x40e519
push edi
xor eax, eax
push esi
inc eax
call fcn.0040726b
mov eax, dword [esi]
cmp dword [eax - 0xc], edi
jge 0x40e4f5
push 0x80070057
call fcn.0040298d
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
cmp eax, edi
je 0x40e740
lea ecx, [eax - 1]
mov eax, esi
call fcn.00402bd5
cmp ax, 0x22
jne 0x40e546
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
dec eax
push eax
xor eax, eax
push esi
inc eax
call fcn.0040726b
push 0x5b2e04
xor ecx, ecx
call fcn.0040788c
mov ecx, eax
cmp ecx, 0xffffffff
je 0x40e569
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
sub eax, ecx
inc eax
push ecx
inc eax
push esi
call fcn.0040726b
push ecx
mov ecx, esp
mov dword [ebp - 0x10], esp
push str..exe
call fcn.0040253b
mov ecx, esi
call fcn.0040e773
cmp eax, edi
jne 0x40e5b6
push ecx
mov ecx, esp
mov dword [ebp - 0x10], esp
push str..dll
call fcn.0040253b
mov ecx, esi
call fcn.0040e773
cmp eax, edi
jne 0x40e5b6
push ecx
mov ecx, esp
mov dword [ebp - 0x10], esp
push str..ocx
call fcn.0040253b
mov ecx, esi
call fcn.0040e773
push 0x5b2e30
xor ecx, ecx
call fcn.0040788c
mov ecx, eax
cmp ecx, 0xffffffff
je 0x40e5d7
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
push ecx
sub eax, ecx
push esi
call fcn.0040726b
push 0x5b2990
xor ecx, ecx
call fcn.0040788c
mov dword [ebp - 0x10], eax
cmp eax, 0xffffffff
je 0x40e6a4
mov edi, esi
call fcn.004140e6
push eax
lea ecx, [ebp - 0x14]
call fcn.00402305
mov ebx, 0x82c
push ebx
lea eax, [ebp]
push 0
push eax
call fcn.004e38a0
add esp, 0xc
cmp dword [ebp - 0x14], 0
je 0x40e624
push dword [ebp - 0x14]
lea eax, [ebp]
call fcn.0040de7e
lea eax, [ebp + 0x41a]
push eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
call fcn.0040253b
lea edi, [ebp - 0x18]
mov byte [ebp - 4], 3
call fcn.004140e6
mov eax, dword [ebp - 0x18]
cmp dword [eax - 0xc], 1
jle 0x40e67b
push eax
xor ecx, ecx
call fcn.0040788c
mov ecx, dword [ebp - 0x10]
cmp eax, ecx
jle 0x40e669
push 0x5b2990
mov ecx, eax
call fcn.0040788c
jmp 0x40e67b
test ecx, ecx
jl 0x40e67b
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
push ecx
sub eax, ecx
push esi
call fcn.0040726b
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.0040285b
push ebx
lea eax, [ebp]
push 0
push eax
call fcn.004e38a0
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x14]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.0040285b
push 0x5b1604
xor ecx, ecx
call fcn.0040788c
mov edi, eax
cmp edi, 0xffffffff
je 0x40e6e8
push 0x5b2450
xor ecx, ecx
call fcn.0040788c
cmp eax, 0xffffffff
je 0x40e6cc
cmp eax, edi
jle 0x40e6e8
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
push edi
sub eax, edi
push esi
call fcn.0040726b
mov ebx, esi
call fcn.0040db9b
mov ebx, eax
call fcn.0040dbe8
push esi
lea ecx, [ebp + 0x838]
call fcn.004025da
push 0
push 0x25
lea ecx, [ebp + 0x838]
call fcn.00414092
cmp eax, 0xffffffff
je 0x40e740
inc eax
push eax
push 0x25
lea ecx, [ebp + 0x838]
call fcn.00414092
cmp eax, 0xffffffff
je 0x40e740
mov edi, 0x800
push edi
mov ecx, esi
call fcn.00402963
push edi
push eax
push dword [ebp + 0x838]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0xffffffffffffffff
mov ecx, esi
call fcn.004145ba
mov ecx, dword [ebp + 0x838]
add ecx, 0xfffffff0
call fcn.0040285b
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x82c]
xor ecx, ebp
call fcn.004de422
add ebp, 0x830
leave
ret 4