Function at 0x40a1f6
Capabilities:
Query environment variable

Disassembly:
push 0x348
mov eax, 0x46aa7f
call fcn.0042dc0b
mov eax, dword [ebp + 8]
mov dword [ebp - 0x340], eax
call fcn.0040b36d
test eax, eax
je 0x40a6b8
xor ebx, ebx
mov dword [ebp - 0x258], 0x6d809377
mov dword [ebp - 0x254], 0x444b6af0
mov dword [ebp - 0x250], 0x77a35789
mov dword [ebp - 0x24c], 0xe20023f
mov dword [ebp - 0x248], 0x6365d5a7
mov dword [ebp - 0x244], 0x45e50f0d
mov dword [ebp - 0x240], 0xa50df687
mov dword [ebp - 0x23c], 0x7d4f6a6b
mov dword [ebp - 0x238], 0x7c5a40ef
mov dword [ebp - 0x234], 0x4bfca0fb
mov dword [ebp - 0x230], 0xf2c04a87
mov dword [ebp - 0x22c], 0x8efab9e0
mov dword [ebp - 0x228], 0xde974d24
mov dword [ebp - 0x224], 0x4d3ed9c6
mov dword [ebp - 0x220], 0x45f491bf
mov dword [ebp - 0x21c], 0x17b92051
mov dword [ebp - 0x268], str.PROGRAMW6432
mov dword [ebp - 0x264], str.COMMONPROGRAMW6432
mov dword [ebp - 0x260], str.PROGRAMFILES_X86_
mov dword [ebp - 0x25c], str.COMMONPROGRAMFILES_X86_
mov dword [ebp - 0x2a0], ebx
mov dword [ebp - 0x29c], 0xf
mov byte [ebp - 0x2b0], bl
push 0x105
lea ecx, [ebp - 0x2b0]
mov dword [ebp - 4], ebx
call fcn.0040bbad
lea eax, [ebp - 0x258]
mov dword [ebp - 0x344], eax
push 0
sub esp, 0x10
mov esi, eax
mov edi, esp
lea eax, [ebp - 0x2b0]
push eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.0040b6a9
add esp, 0x18
test eax, eax
je 0x40a4a7
cmp dword [ebp - 0x29c], 0x10
lea edx, [ebp - 0x2b0]
push 0xf
cmovae edx, dword [ebp - 0x2b0]
and dword [ebp - 0x288], 0
mov ecx, edx
pop edi
mov dword [ebp - 0x284], edi
mov byte [ebp - 0x298], 0
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40a36e
sub ecx, esi
push ecx
push edx
lea ecx, [ebp - 0x298]
call fcn.00404230
mov ecx, dword [ebp + ebx*4 - 0x268]
and dword [ebp - 0x270], 0
mov byte [ebp - 4], 1
mov dword [ebp - 0x26c], edi
mov byte [ebp - 0x280], 0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40a3a6
sub ecx, edx
push ecx
push dword [ebp + ebx*4 - 0x268]
lea ecx, [ebp - 0x280]
call fcn.00404230
lea eax, [ebp - 0x298]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp - 0x280]
push eax
push dword [ebp - 0x340]
lea eax, [ebp - 0x34c]
push eax
call fcn.0040a6be
mov eax, dword [ebp - 0x26c]
add esp, 0x10
cmp eax, 0x10
jb 0x40a438
mov ecx, dword [ebp - 0x280]
inc eax
mov dword [ebp - 0x338], eax
mov dword [ebp - 0x33c], ecx
cmp eax, 0x1000
jb 0x40a42f
lea eax, [ebp - 0x338]
push eax
lea eax, [ebp - 0x33c]
push eax
call fcn.00401311
mov eax, dword [ebp - 0x338]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x33c]
push eax
push ecx
call fcn.0042d727
pop ecx
pop ecx
and dword [ebp - 0x270], 0
mov eax, dword [ebp - 0x284]
mov dword [ebp - 0x26c], edi
mov byte [ebp - 0x280], 0
mov byte [ebp - 4], 0
cmp eax, 0x10
jb 0x40a650
mov ecx, dword [ebp - 0x298]
inc eax
mov dword [ebp - 0x33c], eax
mov dword [ebp - 0x338], ecx
cmp eax, 0x1000
jb 0x40a49a
lea eax, [ebp - 0x33c]
push eax
lea eax, [ebp - 0x338]
push eax
call fcn.00401311
mov eax, dword [ebp - 0x33c]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x338]
push eax
push ecx
call fcn.0042d727
pop ecx
jmp 0x40a64f
mov esi, dword [ebp + ebx*4 - 0x268]
lea eax, [ebp - 0x218]
push 0x208
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x40a650
lea eax, [ebp - 0x330]
mov dword [ebp - 0x334], eax
lea ecx, [ebp - 0x334]
lea eax, [ebp - 0x218]
push eax
call fcn.0040ae72
mov ecx, dword [ebp - 0x334]
and dword [ebp - 0x288], 0
push 0xf
pop edi
mov byte [ebp - 4], 3
lea edx, [ecx + 1]
mov dword [ebp - 0x284], edi
mov byte [ebp - 0x298], 0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40a50b
sub ecx, edx
push ecx
push dword [ebp - 0x334]
lea ecx, [ebp - 0x298]
call fcn.00404230
and dword [ebp - 0x270], 0
mov ecx, esi
mov byte [ebp - 4], 4
mov dword [ebp - 0x26c], edi
mov byte [ebp - 0x280], 0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40a543
sub ecx, edx
push ecx
push esi
lea ecx, [ebp - 0x280]
call fcn.00404230
lea eax, [ebp - 0x298]
mov byte [ebp - 4], 5
push eax
lea eax, [ebp - 0x280]
push eax
push dword [ebp - 0x340]
lea eax, [ebp - 0x354]
push eax
call fcn.0040a6be
mov eax, dword [ebp - 0x26c]
add esp, 0x10
cmp eax, 0x10
jb 0x40a5cf
mov ecx, dword [ebp - 0x280]
inc eax
mov dword [ebp - 0x33c], eax
mov dword [ebp - 0x338], ecx
cmp eax, 0x1000
jb 0x40a5c6
lea eax, [ebp - 0x33c]
push eax
lea eax, [ebp - 0x338]
push eax
call fcn.00401311
mov eax, dword [ebp - 0x33c]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x338]
push eax
push ecx
call fcn.0042d727
pop ecx
pop ecx
and dword [ebp - 0x270], 0
mov eax, dword [ebp - 0x284]
mov dword [ebp - 0x26c], edi
mov byte [ebp - 0x280], 0
cmp eax, 0x10
jb 0x40a632
mov ecx, dword [ebp - 0x298]
inc eax
mov dword [ebp - 0x33c], eax
mov dword [ebp - 0x338], ecx
cmp eax, 0x1000
jb 0x40a629
lea eax, [ebp - 0x33c]
push eax
lea eax, [ebp - 0x338]
push eax
call fcn.00401311
mov eax, dword [ebp - 0x33c]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x338]
push eax
push ecx
call fcn.0042d727
pop ecx
pop ecx
lea eax, [ebp - 0x330]
mov byte [ebp - 4], 0
cmp dword [ebp - 0x334], eax
je 0x40a650
push dword [ebp - 0x334]
call fcn.00432c0b
pop ecx
mov eax, dword [ebp - 0x344]
inc ebx
add eax, 0x10
mov dword [ebp - 0x344], eax
cmp ebx, 4
jb 0x40a31a
mov eax, dword [ebp - 0x29c]
cmp eax, 0x10
jb 0x40a6b8
mov ecx, dword [ebp - 0x2b0]
inc eax
mov dword [ebp - 0x344], eax
mov dword [ebp - 0x340], ecx
cmp eax, 0x1000
jb 0x40a6af
lea eax, [ebp - 0x344]
push eax
lea eax, [ebp - 0x340]
push eax
call fcn.00401311
mov eax, dword [ebp - 0x344]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x340]
push eax
push ecx
call fcn.0042d727
pop ecx
pop ecx
call fcn.0042dbb5
ret