Function at 0x40bef0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b2df9
mov eax, dword fs:[0]
push eax
sub esp, 0xd0
mov eax, dword [0x5210b0]
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], 0x4e1680
mov dword [ebp - 0x48], 0x4e1670
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 0x40bf9f
mov eax, dword [ecx]
lea edx, [ebp - 0x70]
push edx
push edi
call dword [eax + 4]
mov dword [ebp - 0x40], 0x4e1680
mov dword [ebp - 0x18], 0x4e1670
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.0x40c00d
jmp dword [eax*4 + 0x40c208]
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 0x40c03a
add eax, 4
lea ecx, [ebp - 0x3c]
cmp ecx, eax
je 0x40c049
jmp 0x40c03c
xor eax, eax
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x3c]
call fcn.004044f0
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0xa0]
call fcn.00404be0
cmp dword [ebp - 0x2c], 0
jne case.default.0x40c00d
cmp byte [esi + 0x40], 0
jne case.default.0x40c00d
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0xd0]
push 0x4e0fc4
push eax
call fcn.0040c800
mov byte [ebp - 4], 0xe
push 0x4e0fc0
push eax
lea eax, [ebp - 0xa0]
push eax
call fcn.0040c930
add esp, 0x18
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x40]
push eax
call fcn.00403fd0
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0xa0]
call fcn.00404be0
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0xd0]
call fcn.00404be0
jmp case.default.0x40c00d
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 0x40c127
push esi
lea eax, [ebp - 0xdc]
push eax
lea ecx, [ebp - 0x40]
call fcn.00409430
mov byte [ebp - 4], 0x12
mov ecx, dword [eax]
mov byte [eax + 4], 1
call fcn.00403ed0
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.00409a50
lea ecx, [ebx + 4]
lea eax, [ebp - 0x3c]
cmp ecx, eax
je case.default.0x40c00d
push 0xffffffffffffffff
push 0
push eax
call fcn.004044f0
jmp case.default.0x40c00d
lea eax, [ebp - 0xa0]
push eax
lea ecx, [esi + 0x10]
call fcn.004067b0
mov byte [ebp - 4], 0x13
lea ecx, [ebp - 0x70]
push ecx
push eax
lea eax, [ebp - 0xd0]
push eax
call fcn.0040caa0
add esp, 0xc
mov byte [ebp - 4], 0x14
test eax, eax
je 0x40c17c
add eax, 4
lea ecx, [ebp - 0x3c]
cmp ecx, eax
je 0x40c18b
jmp 0x40c17e
xor eax, eax
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x3c]
call fcn.004044f0
mov byte [ebp - 4], 0x13
lea ecx, [ebp - 0xd0]
call fcn.00404be0
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0xa0]
call fcn.00404be0
jmp case.default.0x40c00d
push 0
push 1
lea ecx, [ebp - 0x3c]
call fcn.004034c0
lea ecx, [ebx + 4]
lea eax, [ebp - 0x3c]
cmp ecx, eax
je 0x40c1cb
push 0xffffffffffffffff
push 0
push eax
call fcn.004044f0
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x40]
call fcn.00404be0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x70]
call fcn.00404be0
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.0049c22a
mov esp, ebp
pop ebp
ret 8