Function at 0x401005
Capabilities:
Query environment variable

Disassembly:
jmp 0x412dc0
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x619ef6
push eax
mov dword fs:[0], esp
sub esp, 0x638
push ebx
push ebp
mov ebp, dword [esp + 0x650]
push esi
test ebp, ebp
push edi
mov ebx, ecx
je 0x4130b3
push ebp
call fcn.0042be80
add esp, 4
test eax, eax
je 0x4130b3
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x32]
mov word [esp + 0x30], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x103
lea eax, [esp + 0x34]
push ebp
push eax
call fcn.0042be9d
mov esi, 0x5c
add esp, 0xc
cmp word [esp + 0x30], si
jne 0x413022
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x23a]
mov word [esp + 0x238], 0
rep stosd dword es:[edi], eax
push 0xc
lea ecx, [esp + 0x34]
push str.SystemRoot_
push ecx
stosw word es:[edi], ax
call fcn.0042c62f
add esp, 0xc
test eax, eax
jne 0x412ecd
lea edx, [esp + 0x238]
push str._SystemRoot_
push edx
call fcn.0042be5b
lea eax, [esp + 0x50]
lea ecx, [esp + 0x25a]
push eax
push ecx
mov word [esp + 0x260], si
call fcn.0042be5b
add esp, 0x10
lea edx, [esp + 0x30]
lea eax, [esp + 0x238]
push 0x104
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x4130b3
cmp eax, 0x104
jb 0x413022
jmp 0x4130b3
push 4
push 0x67ef8c
push ebp
call fcn.0042c62f
add esp, 0xc
test eax, eax
jne 0x412f17
lea ecx, [esp + 0x38]
push 0x103
lea edx, [esp + 0x23c]
push ecx
push edx
call fcn.0042be9d
lea eax, [esp + 0x244]
push 0x103
lea ecx, [esp + 0x40]
push eax
push ecx
call fcn.0042be9d
add esp, 0x18
jmp 0x413022
push 0x10
push 0x67ef64
push ebp
call fcn.0042c62f
add esp, 0xc
test eax, eax
jne 0x413022
lea edx, [esp + 0x30]
push 0x103
lea eax, [esp + 0x23c]
push edx
push eax
call fcn.0042be9d
lea ecx, [esp + 0x244]
push ecx
call fcn.0042be80
add esp, 0x10
lea ecx, [esp + 0x20]
mov ebp, eax
call fcn.0044cc90
xor edi, edi
lea ecx, [esp + 0x10]
mov dword [esp + 0x650], edi
call fcn.0044cc90
lea edx, [esp + 0x10]
lea eax, [esp + 0x20]
push edx
push eax
mov ecx, ebx
mov byte [esp + 0x658], 1
call fcn.004015f5
cmp dword [esp + 0x14], edi
jle 0x412ff6
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x238]
mov eax, dword [ecx + edi*4]
mov esi, dword [eax - 8]
push esi
push edx
push eax
call fcn.0042c62f
add esp, 0xc
test eax, eax
je 0x412fbd
mov eax, dword [esp + 0x14]
inc edi
cmp edi, eax
jl 0x412f92
jmp 0x412ff6
mov eax, dword [esp + 0x65c]
sub ebp, esi
add ebp, 2
cmp ebp, eax
jae 0x412ff6
mov eax, dword [esp + 0x20]
push 2
lea ecx, [esp + 0x34]
mov edi, dword [eax + edi*4]
push edi
push ecx
call fcn.0042be9d
lea edx, [esp + esi*2 + 0x244]
lea eax, [esp + 0x40]
push edx
push eax
call fcn.0042be5b
add esp, 0x14
lea ecx, [esp + 0x10]
mov byte [esp + 0x650], 0
call fcn.0044cca0
lea ecx, [esp + 0x20]
mov dword [esp + 0x650], 0xffffffff
call fcn.0044cca0
mov ebp, dword [esp + 0x658]
lea ecx, [esp + 0x30]
push 0x104
push ecx
mov ecx, ebx
call fcn.004013ed
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x442]
mov word [esp + 0x440], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [ebx + 8]
test eax, eax
je 0x41309c
lea edx, [esp + 0x30]
push 0x7e
push edx
call fcn.0042c43c
add esp, 8
test eax, eax
je 0x41309c
lea eax, [esp + 0x440]
push 0x104
lea ecx, [esp + 0x34]
push eax
push ecx
call dword [ebx + 8]
test eax, eax
jbe 0x41309c
cmp eax, 0x104
jae 0x41309c
mov edx, dword [esp + 0x65c]
lea eax, [esp + 0x440]
dec edx
push edx
push eax
jmp 0x4130aa
mov ecx, dword [esp + 0x65c]
lea edx, [esp + 0x30]
dec ecx
push ecx
push edx
push ebp
call fcn.0042be9d
add esp, 0xc
mov ecx, dword [esp + 0x648]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x644
ret 8