Function at 0x40bf30
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b8aa9
mov eax, dword fs:[0]
push eax
sub esp, 0xd0
mov eax, dword [0x52a0b0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov edi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x70], 0x4e7908
mov dword [ebp - 0x48], 0x4e793c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x44], eax
mov dword [ebp - 4], 0
xor eax, eax
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x58], 7
mov dword [ebp - 0x5c], 0
mov word [ebp - 0x6c], ax
mov byte [ebp - 4], 1
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], eax
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x48]
mov eax, dword [eax + 4]
push dword [ebp + eax - 0x48]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [ebp - 4], 5
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x40bfdf
mov eax, dword [ecx]
lea edx, [ebp - 0x70]
push edx
push edi
call dword [eax + 4]
mov dword [ebp - 0x40], 0x4e7908
mov dword [ebp - 0x18], 0x4e793c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 6
xor eax, eax
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x28], 7
mov dword [ebp - 0x2c], 0
mov word [ebp - 0x3c], ax
mov byte [ebp - 4], 7
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov byte [ebp - 4], 8
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 4]
push dword [ebp + eax - 0x18]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov byte [ebp - 4], 0xb
mov eax, dword [esi + 0xc]
cmp eax, 4
ja case.default.0x40c04d
jmp dword [eax*4 + 0x40c248]
mov eax, dword [edi]
lea ecx, [ebp - 0x70]
push ecx
lea ecx, [ebp - 0xa0]
push ecx
mov ecx, edi
call dword [eax + 8]
mov byte [ebp - 4], 0xc
test eax, eax
je 0x40c07a
add eax, 4
lea ecx, [ebp - 0x3c]
cmp ecx, eax
je 0x40c089
jmp 0x40c07c
xor eax, eax
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x3c]
call fcn.00404530
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0xa0]
call fcn.00404c20
cmp dword [ebp - 0x2c], 0
jne case.default.0x40c04d
cmp byte [esi + 0x40], 0
jne case.default.0x40c04d
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0xd0]
push 0x4e800c
push eax
call fcn.0040c840
mov byte [ebp - 4], 0xe
push 0x4e8008
push eax
lea eax, [ebp - 0xa0]
push eax
call fcn.0040c970
add esp, 0x18
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x40]
push eax
call fcn.00404010
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0xa0]
call fcn.00404c20
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0xd0]
call fcn.00404c20
jmp case.default.0x40c04d
cmp dword [ebp - 0x58], 8
lea eax, [ebp - 0x6c]
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmovae eax, dword [ebp - 0x6c]
push 0
push 0
push eax
call edi
mov esi, eax
test esi, esi
je 0x40c167
push esi
lea eax, [ebp - 0xdc]
push eax
lea ecx, [ebp - 0x40]
call fcn.00409470
mov byte [ebp - 4], 0x12
mov ecx, dword [eax]
mov byte [eax + 4], 1
call fcn.00403f10
cmp dword [ebp - 0x58], 8
lea ecx, [ebp - 0x6c]
push esi
cmovae ecx, dword [ebp - 0x6c]
push dword [eax]
push ecx
call edi
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0xdc]
call fcn.00409a90
lea ecx, [ebx + 4]
lea eax, [ebp - 0x3c]
cmp ecx, eax
je case.default.0x40c04d
push 0xffffffffffffffff
push 0
push eax
call fcn.00404530
jmp case.default.0x40c04d
lea eax, [ebp - 0xa0]
push eax
lea ecx, [esi + 0x10]
call fcn.004067f0
mov byte [ebp - 4], 0x13
lea ecx, [ebp - 0x70]
push ecx
push eax
lea eax, [ebp - 0xd0]
push eax
call fcn.0040cae0
add esp, 0xc
mov byte [ebp - 4], 0x14
test eax, eax
je 0x40c1bc
add eax, 4
lea ecx, [ebp - 0x3c]
cmp ecx, eax
je 0x40c1cb
jmp 0x40c1be
xor eax, eax
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x3c]
call fcn.00404530
mov byte [ebp - 4], 0x13
lea ecx, [ebp - 0xd0]
call fcn.00404c20
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0xa0]
call fcn.00404c20
jmp case.default.0x40c04d
push 0
push 1
lea ecx, [ebp - 0x3c]
call fcn.00403500
lea ecx, [ebx + 4]
lea eax, [ebp - 0x3c]
cmp ecx, eax
je 0x40c20b
push 0xffffffffffffffff
push 0
push eax
call fcn.00404530
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x40]
call fcn.00404c20
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x70]
call fcn.00404c20
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004a103a
mov esp, ebp
pop ebp
ret 8