Function at 0x4183c0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x454b54
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x471078]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 0xc]
xorps xmm0, xmm0
movq qword [ebp - 0x38], xmm0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
push ecx
lea eax, [ebp - 0x40]
mov dword [ebp - 4], 0
push eax
lea eax, [ebp - 0x38]
mov dword [ebp - 0x40], 0
push eax
push ecx
call fcn.004182f0
add esp, 0x10
test al, al
jne 0x41844b
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [ebp - 0x38]
mov ebx, eax
call fcn.00410c40
jmp 0x4186c0
mov eax, dword [ebp - 0x40]
cmp eax, 1
je 0x418458
cmp eax, 2
jne 0x418465
mov ebx, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x38]
sub ebx, ecx
test bl, 1
je 0x418477
lea ecx, [ebp - 0x38]
mov ebx, 0xd
call fcn.00410c40
jmp 0x4186c0
xor eax, eax
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], 0
mov word [ebp - 0x2c], ax
mov eax, ebx
mov byte [ebp - 4], 1
shr eax, 1
jne 0x4184a1
xor edx, edx
mov dword [ebp - 0x1c], eax
mov word [ebp + eax*2 - 0x2c], dx
jmp 0x4184af
push 0
push eax
lea ecx, [ebp - 0x2c]
call fcn.004096f0
mov ecx, dword [ebp - 0x38]
mov edi, dword [ebp - 0x1c]
test edi, edi
je 0x4184cf
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
push ebx
cmovae eax, dword [ebp - 0x2c]
push ecx
push eax
call fcn.00437b90
mov edi, dword [ebp - 0x1c]
add esp, 0xc
xor eax, eax
lea ecx, [ebp - 0x2c]
push 1
push eax
mov word [ebp - 0x3c], ax
lea eax, [ebp - 0x3c]
push eax
call fcn.0040b180
cmp eax, 0xffffffff
je 0x41850d
lea ecx, [ebp - 0x2c]
cmp eax, edi
ja 0x418503
cmp dword [ebp - 0x18], 8
mov dword [ebp - 0x1c], eax
cmovae ecx, dword [ebp - 0x2c]
xor edx, edx
mov word [ecx + eax*2], dx
jmp 0x41850d
push 0
sub eax, edi
push eax
call fcn.004096f0
cmp dword [ebp - 0x40], 2
jne 0x418649
xor edx, edx
mov eax, 7
xor ecx, ecx
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x48], edx
mov word [ebp - 0x58], cx
mov byte [ebp - 4], 2
nop
cmp eax, 8
lea ecx, [ebp - 0x58]
push edx
cmovae ecx, dword [ebp - 0x58]
lea eax, [ebp - 0x2c]
cmp dword [ebp - 0x18], 8
push ecx
cmovae eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov ecx, dword [ebp - 0x48]
cmp eax, ecx
jbe 0x41856a
sub eax, ecx
lea ecx, [ebp - 0x58]
push 0
push eax
call fcn.004096f0
mov eax, dword [ebp - 0x44]
mov edx, dword [ebp - 0x48]
jmp 0x418530
test eax, eax
jne 0x4185d5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov eax, dword [ebp - 0x44]
cmp eax, 8
jb 0x41858b
inc eax
lea ecx, [ebp - 0x58]
push eax
push dword [ebp - 0x58]
call fcn.0040ca80
xor eax, eax
mov dword [ebp - 0x44], 7
mov word [ebp - 0x58], ax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x48], 0
cmp eax, 8
jb 0x4185b4
inc eax
lea ecx, [ebp - 0x2c]
push eax
push dword [ebp - 0x2c]
call fcn.0040ca80
xor eax, eax
mov dword [ebp - 0x18], 7
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x1c], 0
mov word [ebp - 0x2c], ax
call fcn.00410c40
jmp 0x4186c0
lea edx, [eax - 1]
cmp edx, ecx
ja 0x4185f2
cmp dword [ebp - 0x44], 8
lea eax, [ebp - 0x58]
mov dword [ebp - 0x48], edx
cmovae eax, dword [ebp - 0x58]
xor ecx, ecx
mov word [eax + edx*2], cx
jmp 0x4185ff
sub edx, ecx
lea ecx, [ebp - 0x58]
push 0
push edx
call fcn.004096f0
mov eax, dword [ebp - 0x18]
cmp eax, 8
jb 0x418614
inc eax
lea ecx, [ebp - 0x2c]
push eax
push dword [ebp - 0x2c]
call fcn.0040ca80
xor eax, eax
mov dword [ebp - 0x18], 7
mov word [ebp - 0x2c], ax
lea ecx, [ebp - 0x2c]
lea eax, [ebp - 0x58]
mov dword [ebp - 0x1c], 0
push eax
call fcn.0040b920
mov eax, dword [ebp - 0x44]
cmp eax, 8
jb 0x418649
inc eax
lea ecx, [ebp - 0x58]
push eax
push dword [ebp - 0x58]
call fcn.0040ca80
lea eax, [ebp - 0x2c]
cmp esi, eax
je 0x41868d
mov eax, dword [esi + 0x14]
cmp eax, 8
jb 0x418663
inc eax
mov ecx, esi
push eax
push dword [esi]
call fcn.0040ca80
mov dword [esi + 0x14], 7
cmp dword [esi + 0x14], 8
mov dword [esi + 0x10], 0
jb 0x41867b
mov eax, dword [esi]
jmp 0x41867d
mov eax, esi
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x2c]
push eax
mov ecx, esi
call fcn.0040b920
mov eax, dword [ebp - 0x18]
cmp eax, 8
jb 0x4186a2
inc eax
lea ecx, [ebp - 0x2c]
push eax
push dword [ebp - 0x2c]
call fcn.0040ca80
xor eax, eax
mov dword [ebp - 0x18], 7
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x1c], 0
mov word [ebp - 0x2c], ax
call fcn.00410c40
xor ebx, ebx
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
test ebx, ebx
sete al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0041e04a
mov esp, ebp
pop ebp
ret