Function at 0x405e68
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x201c
call fcn.00417744
push edi
push esi
push ebx
add esp, 0xfffffff4
push 0x405d09
call fcn.004086f0
add esp, 0xfffffff4
push 0x30
call fcn.00417534
mov dword [ebp - 0x2004], eax
xor esi, esi
add esp, 0x20
cmp dword [0x42285c], 0
je 0x405ed6
add esp, 0xfffffff4
push 0x2000
call fcn.00417534
mov edx, dword [ebp - 0x2004]
mov dword [edx], eax
push dword [0x42285c]
push 0x405d1b
push 0x405d2f
push eax
call sub.msvcrt.dll_sprintf
mov esi, 1
add esp, 0x20
cmp byte [0x422028], 0
je 0x405f0c
add esp, 0xfffffff4
push 0x2000
call fcn.00417534
mov edx, dword [ebp - 0x2004]
mov dword [edx + esi*4], eax
add esp, 0xfffffffc
push 0x405d37
push 0x405d47
push eax
call sub.msvcrt.dll_sprintf
inc esi
add esp, 0x20
cmp byte [0x42287c], 0
je 0x405f42
add esp, 0xfffffff4
push 0x2000
call fcn.00417534
mov edx, dword [ebp - 0x2004]
mov dword [edx + esi*4], eax
add esp, 0xfffffffc
push 0x405d51
push 0x405d47
push eax
call sub.msvcrt.dll_sprintf
inc esi
add esp, 0x20
cmp byte [0x4301a0], 0x69
jne 0x405f78
add esp, 0xfffffff4
push 0x2000
call fcn.00417534
mov edx, dword [ebp - 0x2004]
mov dword [edx + esi*4], eax
add esp, 0xfffffffc
push 0x405d5b
push 0x405d47
push eax
call sub.msvcrt.dll_sprintf
inc esi
add esp, 0x20
add esp, 0xfffffff4
push 0x2000
call fcn.00417534
mov edx, dword [ebp - 0x2004]
mov dword [edx + esi*4], eax
call fcn.00404618
push eax
push 0x405d6d
push 0x405d2f
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.00417534
mov edx, dword [ebp - 0x2004]
mov dword [edx + esi*4], eax
call fcn.00404618
push eax
push 0x405d7e
push 0x405d2f
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 0x40603f
add esp, 0xfffffff8
call sub.KERNEL32.dll_GetCurrentProcessId
push eax
lea ebx, [ebp - 0x2000]
push ebx
call fcn.00404e88
add esp, 0xfffffff4
push 0x2000
call fcn.00417534
mov edx, dword [ebp - 0x2004]
mov dword [edx + esi*4], eax
add esp, 0x20
push ebx
push 0x405d8f
push 0x405d2f
push eax
call sub.msvcrt.dll_sprintf
inc esi
add esp, 0x10
add esp, 0xfffffff4
push 0x2000
call fcn.00417534
mov edx, dword [ebp - 0x2004]
mov dword [edx + esi*4], eax
push 0x42e198
push 0x405da5
push 0x405d2f
push eax
call sub.msvcrt.dll_sprintf
inc esi
add esp, 0x20
add esp, 0xfffffff4
push 0x2000
call fcn.00417534
mov edx, dword [ebp - 0x2004]
mov dword [edx + esi*4], eax
add esp, 0x10
cmp byte [0x42287d], 0
je 0x406098
mov eax, 0xffffffff
jmp 0x40609d
call fcn.00401924
push eax
push 0x405db3
push 0x405dcd
mov eax, dword [ebp - 0x2004]
push dword [eax + esi*4]
call sub.msvcrt.dll_sprintf
inc esi
add esp, 0xfffffff4
push 0x2000
call fcn.00417534
mov edx, dword [ebp - 0x2004]
mov dword [edx + esi*4], eax
add esp, 0x20
add esp, 0xfffffff8
push 0x405dd5
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 0x405dea
call sub.KERNEL32.dll_GetEnvironmentVariableA
inc esi
add esp, 0xfffffff8
push 0x405def
call sub.msvcrt.dll_getenv
add esp, 0x20
test eax, eax
jne 0x40616d
add esp, 0xfffffff4
push 0x2000
call fcn.00417534
mov edx, dword [ebp - 0x2004]
mov dword [edx + esi*4], eax
call sub.KERNEL32.dll_GetConsoleOutputCP
push eax
push 0x405df7
push 0x405e0d
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.00405a60
add esp, 0x10
test al, al
jne 0x406198
add esp, 0xfffffff4
push 0x405e17
jmp 0x4061ca
add esp, 0xfffffff4
push 0x405e30
call fcn.004086f0
add esp, 0x10
mov byte [0x422029], 1
add esp, 0xfffffff4
mov edx, dword [ebp + 8]
push edx
call fcn.00406544
add esp, 0x10
test al, al
jne 0x4061d4
add esp, 0xfffffff4
push 0x405e3c
call fcn.00408684
mov al, 0
jmp 0x40620d
cmp byte [ebp + 0xc], 0
je 0x4061fe
add esp, 0xfffffff4
push 0x405e50
call fcn.004086f0
mov edx, dword [0x428084]
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 0x405e59
call fcn.004086f0
mov al, 1
lea esp, [ebp - 0x2028]
pop ebx
pop esi
pop edi
leave
ret