Function at 0x401379
Capabilities:
Query environment variable

Disassembly:
push 0x2c4
mov eax, 0x40dedd
call fcn.0040472c
mov ebx, edx
mov edi, ecx
xor esi, esi
mov dword [ebp - 0x2a0], esi
mov dword [ebp - 4], esi
test ebx, ebx
je 0x40139d
mov dword [ebx], esi
push 1
push esi
lea eax, [ebp - 0x224]
push eax
lea ecx, [ebp + 8]
mov dword [ebp - 0x224], 0x3a
call fcn.00402948
push 1
mov dword [ebp - 0x220], eax
push esi
lea eax, [ebp - 0x224]
push eax
lea ecx, [ebp + 8]
mov dword [ebp - 0x224], 0x25
call fcn.00402948
mov esi, eax
mov dword [ebp - 0x224], esi
cmp esi, 0xffffffff
jne 0x401402
cmp dword [ebp + 0x1c], 8
lea ecx, [ebp + 8]
cmovae ecx, dword [ebp + 8]
push ecx
mov ecx, edi
call fcn.00402710
push 0
jmp 0x40175c
mov eax, dword [ebp - 0x220]
cmp eax, 0xffffffff
je 0x40141f
cmp eax, esi
jae 0x40141f
cmp dword [ebp + 0x1c], 8
lea eax, [ebp + 8]
cmovae eax, dword [ebp + 8]
push eax
jmp 0x4013f4
push 1
lea eax, [esi + 1]
push eax
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp + 8]
mov dword [ebp - 0x220], 0x25
call fcn.00402948
mov dword [ebp - 0x220], eax
cmp eax, 0xffffffff
je 0x401411
sub eax, esi
dec eax
push eax
lea eax, [esi + 1]
push eax
lea eax, [ebp - 0x26c]
push eax
lea ecx, [ebp + 8]
call fcn.00402764
xor eax, eax
push 0x206
mov byte [ebp - 4], 1
push eax
mov word [ebp - 0x21c], ax
lea eax, [ebp - 0x21a]
push eax
call fcn.004097f0
add esp, 0xc
cmp dword [ebp - 0x258], 8
push 0x104
lea ecx, [ebp - 0x21c]
lea eax, [ebp - 0x26c]
cmovae eax, dword [ebp - 0x26c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0xcb
test esi, esi
je 0x40172b
cmp eax, ecx
je 0x40172b
xor eax, eax
push 0xffffffffffffffff
xor esi, esi
mov word [ebp - 0x254], ax
push esi
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x254]
mov dword [ebp - 0x240], 7
mov dword [ebp - 0x244], esi
call fcn.00402825
mov byte [ebp - 4], 2
xor eax, eax
lea ecx, [ebp - 0x21c]
mov dword [ebp - 0x228], 7
mov dword [ebp - 0x22c], esi
mov word [ebp - 0x23c], ax
call fcn.00401000
mov esi, eax
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x23c]
call fcn.00403026
lea ecx, [ebp - 0x23c]
test al, al
je 0x40154f
lea eax, [ebp - 0x21c]
sub eax, ecx
push esi
sar eax, 1
push eax
mov eax, ecx
push eax
call fcn.00402825
jmp 0x4015ab
push 0
push esi
call fcn.00402c5e
test al, al
je 0x4015ab
mov edx, dword [ebp - 0x228]
cmp edx, 8
lea ecx, [ebp - 0x23c]
cmovae ecx, dword [ebp - 0x23c]
test esi, esi
je 0x40158f
lea eax, [esi + esi]
push eax
lea eax, [ebp - 0x21c]
push eax
push ecx
call fcn.00403fa0
mov edx, dword [ebp - 0x228]
add esp, 0xc
cmp edx, 8
lea eax, [ebp - 0x23c]
cmovae eax, dword [ebp - 0x23c]
xor ecx, ecx
mov dword [ebp - 0x22c], esi
mov word [eax + esi*2], cx
mov byte [ebp - 4], 3
cmp dword [ebp - 0x22c], 0
jbe 0x401689
push dword [ebp - 0x224]
lea eax, [ebp - 0x284]
push 0
push eax
lea ecx, [ebp + 8]
call fcn.00402764
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x220]
push 0xffffffffffffffff
inc eax
push eax
lea eax, [ebp - 0x29c]
push eax
lea ecx, [ebp + 8]
call fcn.00402764
lea eax, [ebp - 0x21c]
push eax
lea edx, [ebp - 0x284]
lea ecx, [ebp - 0x2b8]
mov byte [ebp - 4], 5
call fcn.00403141
pop ecx
lea ecx, [ebp - 0x29c]
push ecx
mov edx, eax
lea ecx, [ebp - 0x2d0]
mov byte [ebp - 4], 6
call fcn.004031d3
mov esi, eax
lea eax, [ebp - 0x254]
pop ecx
cmp eax, esi
je 0x401649
push 0
push 1
mov ecx, eax
call fcn.00402a1d
push esi
lea ecx, [ebp - 0x254]
call fcn.004027d9
xor esi, esi
push esi
push 1
lea ecx, [ebp - 0x2d0]
call fcn.00402a1d
push esi
push 1
lea ecx, [ebp - 0x2b8]
call fcn.00402a1d
push esi
push 1
lea ecx, [ebp - 0x29c]
call fcn.00402a1d
push esi
push 1
lea ecx, [ebp - 0x284]
mov byte [ebp - 4], 3
call fcn.00402a1d
jmp 0x40168b
xor esi, esi
sub esp, 0x18
mov ecx, esp
xor eax, eax
push 0xffffffffffffffff
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], esi
mov word [ecx], ax
push esi
lea eax, [ebp - 0x254]
push eax
call fcn.00402825
mov edx, ebx
lea ecx, [ebp - 0x2b8]
call fcn.00401379
mov esi, eax
lea eax, [ebp - 0x254]
add esp, 0x18
xor ebx, ebx
cmp eax, esi
je 0x4016e2
push ebx
push 1
mov ecx, eax
call fcn.00402a1d
push esi
lea ecx, [ebp - 0x254]
call fcn.004027d9
push ebx
push 1
lea ecx, [ebp - 0x2b8]
call fcn.00402a1d
xor eax, eax
mov dword [edi + 0x14], 7
mov dword [edi + 0x10], ebx
mov word [edi], ax
lea eax, [ebp - 0x254]
push eax
mov ecx, edi
call fcn.004027d9
push ebx
push 1
lea ecx, [ebp - 0x23c]
call fcn.00402a1d
push ebx
push 1
lea ecx, [ebp - 0x254]
call fcn.00402a1d
jmp 0x40174d
test ebx, ebx
je 0x401731
mov dword [ebx], ecx
xor ebx, ebx
xor eax, eax
mov dword [edi + 0x14], 7
mov dword [edi + 0x10], ebx
mov word [edi], ax
lea eax, [ebp + 8]
push eax
mov ecx, edi
call fcn.004027d9
push ebx
push 1
lea ecx, [ebp - 0x26c]
call fcn.00402a1d
push ebx
push 1
lea ecx, [ebp + 8]
call fcn.00402a1d
mov eax, edi
call fcn.004046ea
ret