Function at 0x40bc00
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b0429
mov eax, dword fs:[0]
push eax
sub esp, 0xd0
mov eax, dword [0x51c0b0]
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], 0x4dd804
mov dword [ebp - 0x48], 0x4dcac4
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 0x40bcaf
mov eax, dword [ecx]
lea edx, [ebp - 0x70]
push edx
push edi
call dword [eax + 4]
mov dword [ebp - 0x40], 0x4dd804
mov dword [ebp - 0x18], 0x4dcac4
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.0x40bd1d
jmp dword [eax*4 + 0x40bf18]
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 0x40bd4a
add eax, 4
lea ecx, [ebp - 0x3c]
cmp ecx, eax
je 0x40bd59
jmp 0x40bd4c
xor eax, eax
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x3c]
call fcn.004046f0
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0xa0]
call fcn.00404db0
cmp dword [ebp - 0x2c], 0
jne case.default.0x40bd1d
cmp byte [esi + 0x40], 0
jne case.default.0x40bd1d
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0xd0]
push 0x4dd13c
push eax
call fcn.0040c530
mov byte [ebp - 4], 0xe
push 0x4dd138
push eax
lea eax, [ebp - 0xa0]
push eax
call fcn.0040c740
add esp, 0x18
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x40]
push eax
call fcn.00404140
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0xa0]
call fcn.00404db0
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0xd0]
call fcn.00404db0
jmp case.default.0x40bd1d
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 0x40be37
push esi
lea eax, [ebp - 0xdc]
push eax
lea ecx, [ebp - 0x40]
call fcn.00409e80
mov byte [ebp - 4], 0x12
mov ecx, dword [eax]
mov byte [eax + 4], 1
call fcn.00404040
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.00409da0
lea ecx, [ebx + 4]
lea eax, [ebp - 0x3c]
cmp ecx, eax
je case.default.0x40bd1d
push 0xffffffffffffffff
push 0
push eax
call fcn.004046f0
jmp case.default.0x40bd1d
lea eax, [ebp - 0xa0]
push eax
lea ecx, [esi + 0x10]
call fcn.00406980
mov byte [ebp - 4], 0x13
lea ecx, [ebp - 0x70]
push ecx
push eax
lea eax, [ebp - 0xd0]
push eax
call fcn.0040c8b0
add esp, 0xc
mov byte [ebp - 4], 0x14
test eax, eax
je 0x40be8c
add eax, 4
lea ecx, [ebp - 0x3c]
cmp ecx, eax
je 0x40be9b
jmp 0x40be8e
xor eax, eax
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x3c]
call fcn.004046f0
mov byte [ebp - 4], 0x13
lea ecx, [ebp - 0xd0]
call fcn.00404db0
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0xa0]
call fcn.00404db0
jmp case.default.0x40bd1d
push 0
push 1
lea ecx, [ebp - 0x3c]
call fcn.00403630
lea ecx, [ebx + 4]
lea eax, [ebp - 0x3c]
cmp ecx, eax
je 0x40bedb
push 0xffffffffffffffff
push 0
push eax
call fcn.004046f0
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x40]
call fcn.00404db0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x70]
call fcn.00404db0
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.004996ca
mov esp, ebp
pop ebp
ret 8