Function at 0x401005
Capabilities:
Query environment variable

Disassembly:
jmp 0x412990
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x615db6
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 0x412c83
push ebp
call fcn.0042ba50
add esp, 4
test eax, eax
je 0x412c83
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.0042ba6d
mov esi, 0x5c
add esp, 0xc
cmp word [esp + 0x30], si
jne 0x412bf2
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.0042c1ff
add esp, 0xc
test eax, eax
jne 0x412a9d
lea edx, [esp + 0x238]
push str._SystemRoot_
push edx
call fcn.0042ba2b
lea eax, [esp + 0x50]
lea ecx, [esp + 0x25a]
push eax
push ecx
mov word [esp + 0x260], si
call fcn.0042ba2b
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 0x412c83
cmp eax, 0x104
jb 0x412bf2
jmp 0x412c83
push 4
push 0x679fa4
push ebp
call fcn.0042c1ff
add esp, 0xc
test eax, eax
jne 0x412ae7
lea ecx, [esp + 0x38]
push 0x103
lea edx, [esp + 0x23c]
push ecx
push edx
call fcn.0042ba6d
lea eax, [esp + 0x244]
push 0x103
lea ecx, [esp + 0x40]
push eax
push ecx
call fcn.0042ba6d
add esp, 0x18
jmp 0x412bf2
push 0x10
push 0x679f7c
push ebp
call fcn.0042c1ff
add esp, 0xc
test eax, eax
jne 0x412bf2
lea edx, [esp + 0x30]
push 0x103
lea eax, [esp + 0x23c]
push edx
push eax
call fcn.0042ba6d
lea ecx, [esp + 0x244]
push ecx
call fcn.0042ba50
add esp, 0x10
lea ecx, [esp + 0x20]
mov ebp, eax
call fcn.0044c860
xor edi, edi
lea ecx, [esp + 0x10]
mov dword [esp + 0x650], edi
call fcn.0044c860
lea edx, [esp + 0x10]
lea eax, [esp + 0x20]
push edx
push eax
mov ecx, ebx
mov byte [esp + 0x658], 1
call fcn.004015ff
cmp dword [esp + 0x14], edi
jle 0x412bc6
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.0042c1ff
add esp, 0xc
test eax, eax
je 0x412b8d
mov eax, dword [esp + 0x14]
inc edi
cmp edi, eax
jl 0x412b62
jmp 0x412bc6
mov eax, dword [esp + 0x65c]
sub ebp, esi
add ebp, 2
cmp ebp, eax
jae 0x412bc6
mov eax, dword [esp + 0x20]
push 2
lea ecx, [esp + 0x34]
mov edi, dword [eax + edi*4]
push edi
push ecx
call fcn.0042ba6d
lea edx, [esp + esi*2 + 0x244]
lea eax, [esp + 0x40]
push edx
push eax
call fcn.0042ba2b
add esp, 0x14
lea ecx, [esp + 0x10]
mov byte [esp + 0x650], 0
call fcn.0044c870
lea ecx, [esp + 0x20]
mov dword [esp + 0x650], 0xffffffff
call fcn.0044c870
mov ebp, dword [esp + 0x658]
lea ecx, [esp + 0x30]
push 0x104
push ecx
mov ecx, ebx
call fcn.004013f7
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 0x412c6c
lea edx, [esp + 0x30]
push 0x7e
push edx
call fcn.0042c00c
add esp, 8
test eax, eax
je 0x412c6c
lea eax, [esp + 0x440]
push 0x104
lea ecx, [esp + 0x34]
push eax
push ecx
call dword [ebx + 8]
test eax, eax
jbe 0x412c6c
cmp eax, 0x104
jae 0x412c6c
mov edx, dword [esp + 0x65c]
lea eax, [esp + 0x440]
dec edx
push edx
push eax
jmp 0x412c7a
mov ecx, dword [esp + 0x65c]
lea edx, [esp + 0x30]
dec ecx
push ecx
push edx
push ebp
call fcn.0042ba6d
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