Function at 0x405ac8
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x201c
call fcn.004170c4
push edi
push esi
push ebx
add esp, 0xfffffff4
push 0x405969
call fcn.00408090
add esp, 0xfffffff4
push 0x30
call fcn.00416eb4
mov dword [ebp - 0x2004], eax
xor esi, esi
add esp, 0x20
cmp dword [0x42285c], 0
je 0x405b36
add esp, 0xfffffff4
push 0x2000
call fcn.00416eb4
mov edx, dword [ebp - 0x2004]
mov dword [edx], eax
push dword [0x42285c]
push 0x40597b
push 0x40598f
push eax
call sub.msvcrt.dll_sprintf
mov esi, 1
add esp, 0x20
cmp byte [0x422028], 0
je 0x405b6c
add esp, 0xfffffff4
push 0x2000
call fcn.00416eb4
mov edx, dword [ebp - 0x2004]
mov dword [edx + esi*4], eax
add esp, 0xfffffffc
push 0x405997
push 0x4059a7
push eax
call sub.msvcrt.dll_sprintf
inc esi
add esp, 0x20
cmp byte [0x42287c], 0
je 0x405ba2
add esp, 0xfffffff4
push 0x2000
call fcn.00416eb4
mov edx, dword [ebp - 0x2004]
mov dword [edx + esi*4], eax
add esp, 0xfffffffc
push 0x4059b1
push 0x4059a7
push eax
call sub.msvcrt.dll_sprintf
inc esi
add esp, 0x20
cmp byte [0x430198], 0x69
jne 0x405bd8
add esp, 0xfffffff4
push 0x2000
call fcn.00416eb4
mov edx, dword [ebp - 0x2004]
mov dword [edx + esi*4], eax
add esp, 0xfffffffc
push 0x4059bb
push 0x4059a7
push eax
call sub.msvcrt.dll_sprintf
inc esi
add esp, 0x20
add esp, 0xfffffff4
push 0x2000
call fcn.00416eb4
mov edx, dword [ebp - 0x2004]
mov dword [edx + esi*4], eax
call fcn.00404278
push eax
push 0x4059cd
push 0x40598f
mov eax, dword [ebp - 0x2004]
push dword [eax + esi*4]
call sub.msvcrt.dll_sprintf
inc esi
add esp, 0x20
add esp, 0xfffffff4
push 0x2000
call fcn.00416eb4
mov edx, dword [ebp - 0x2004]
mov dword [edx + esi*4], eax
call fcn.00404278
push eax
push 0x4059de
push 0x40598f
mov eax, dword [ebp - 0x2004]
push dword [eax + esi*4]
call sub.msvcrt.dll_sprintf
inc esi
add esp, 0x20
add esp, 0xfffffff4
push 0x2715
call fcn.004019cc
add esp, 0x10
test eax, eax
je 0x405c9f
add esp, 0xfffffff8
call sub.KERNEL32.dll_GetCurrentProcessId
push eax
lea ebx, [ebp - 0x2000]
push ebx
call fcn.00404ae8
add esp, 0xfffffff4
push 0x2000
call fcn.00416eb4
mov edx, dword [ebp - 0x2004]
mov dword [edx + esi*4], eax
add esp, 0x20
push ebx
push 0x4059ef
push 0x40598f
push eax
call sub.msvcrt.dll_sprintf
inc esi
add esp, 0x10
add esp, 0xfffffff4
push 0x2000
call fcn.00416eb4
mov edx, dword [ebp - 0x2004]
mov dword [edx + esi*4], eax
push 0x42e190
push 0x405a05
push 0x40598f
push eax
call sub.msvcrt.dll_sprintf
inc esi
add esp, 0x20
add esp, 0xfffffff4
push 0x2000
call fcn.00416eb4
mov edx, dword [ebp - 0x2004]
mov dword [edx + esi*4], eax
add esp, 0x10
cmp byte [0x42287d], 0
je 0x405cf8
mov eax, 0xffffffff
jmp 0x405cfd
call fcn.00401924
push eax
push 0x405a13
push 0x405a2d
mov eax, dword [ebp - 0x2004]
push dword [eax + esi*4]
call sub.msvcrt.dll_sprintf
inc esi
add esp, 0xfffffff4
push 0x2000
call fcn.00416eb4
mov edx, dword [ebp - 0x2004]
mov dword [edx + esi*4], eax
add esp, 0x20
add esp, 0xfffffff8
push 0x405a35
push eax
call sub.msvcrt.dll_sprintf
add esp, 0xfffffffc
mov eax, dword [ebp - 0x2004]
mov ebx, dword [eax + esi*4]
mov edi, ebx
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea eax, [ecx - 1]
mov edx, 0x2000
sub edx, eax
push edx
mov edi, ebx
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea eax, [ebx + ecx - 1]
push eax
push 0x405a4a
call sub.KERNEL32.dll_GetEnvironmentVariableA
inc esi
add esp, 0xfffffff8
push 0x405a4f
call sub.msvcrt.dll_getenv
add esp, 0x20
test eax, eax
jne 0x405dcd
add esp, 0xfffffff4
push 0x2000
call fcn.00416eb4
mov edx, dword [ebp - 0x2004]
mov dword [edx + esi*4], eax
call sub.KERNEL32.dll_GetConsoleOutputCP
push eax
push 0x405a57
push 0x405a6d
mov eax, dword [ebp - 0x2004]
push dword [eax + esi*4]
call sub.msvcrt.dll_sprintf
inc esi
add esp, 0x20
mov edx, dword [ebp - 0x2004]
mov dword [edx + esi*4], 0
add esp, 0xfffffff8
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.004056c0
add esp, 0x10
test al, al
jne 0x405df8
add esp, 0xfffffff4
push 0x405a77
jmp 0x405e2a
add esp, 0xfffffff4
push 0x405a90
call fcn.00408090
add esp, 0x10
mov byte [0x422029], 1
add esp, 0xfffffff4
mov edx, dword [ebp + 8]
push edx
call fcn.00406158
add esp, 0x10
test al, al
jne 0x405e34
add esp, 0xfffffff4
push 0x405a9c
call fcn.00408024
mov al, 0
jmp 0x405e6d
cmp byte [ebp + 0xc], 0
je 0x405e5e
add esp, 0xfffffff4
push 0x405ab0
call fcn.00408090
mov edx, dword [0x42807c]
add esp, 0x10
add esp, 0xfffffff4
mov eax, dword [edx]
push edx
mov eax, dword [eax + 0xc]
call eax
add esp, 0xc
add esp, 0xfffffff4
push 0x405ab9
call fcn.00408090
mov al, 1
lea esp, [ebp - 0x2028]
pop ebx
pop esi
pop edi
leave
ret