Function at 0x404c94
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x201c
call fcn.004161a4
push edi
push esi
push ebx
add esp, 0xfffffff4
push 0x404b49
call fcn.00407210
add esp, 0xfffffff4
push 0x30
call fcn.00415f94
mov dword [ebp - 0x2004], eax
xor esi, esi
add esp, 0x20
cmp dword [0x42185c], 0
je 0x404d02
add esp, 0xfffffff4
push 0x2000
call fcn.00415f94
mov edx, dword [ebp - 0x2004]
mov dword [edx], eax
push dword [0x42185c]
push 0x404b5b
push 0x404b6f
push eax
call sub.msvcrt.dll_sprintf
mov esi, 1
add esp, 0x20
cmp byte [0x421028], 0
je 0x404d38
add esp, 0xfffffff4
push 0x2000
call fcn.00415f94
mov edx, dword [ebp - 0x2004]
mov dword [edx + esi*4], eax
add esp, 0xfffffffc
push 0x404b77
push 0x404b87
push eax
call sub.msvcrt.dll_sprintf
inc esi
add esp, 0x20
cmp byte [0x42187c], 0
je 0x404d6e
add esp, 0xfffffff4
push 0x2000
call fcn.00415f94
mov edx, dword [ebp - 0x2004]
mov dword [edx + esi*4], eax
add esp, 0xfffffffc
push 0x404b91
push 0x404b87
push eax
call sub.msvcrt.dll_sprintf
inc esi
add esp, 0x20
cmp byte [0x42f198], 0x69
jne 0x404da4
add esp, 0xfffffff4
push 0x2000
call fcn.00415f94
mov edx, dword [ebp - 0x2004]
mov dword [edx + esi*4], eax
add esp, 0xfffffffc
push 0x404b9b
push 0x404b87
push eax
call sub.msvcrt.dll_sprintf
inc esi
add esp, 0x20
add esp, 0xfffffff4
push 0x2000
call fcn.00415f94
mov edx, dword [ebp - 0x2004]
mov dword [edx + esi*4], eax
call fcn.004034b8
push eax
push 0x404bad
push 0x404b6f
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 0x404e33
add esp, 0xfffffff8
call sub.KERNEL32.dll_GetCurrentProcessId
push eax
lea ebx, [ebp - 0x2000]
push ebx
call fcn.00403ce8
add esp, 0xfffffff4
push 0x2000
call fcn.00415f94
mov edx, dword [ebp - 0x2004]
mov dword [edx + esi*4], eax
add esp, 0x20
push ebx
push 0x404bbe
push 0x404b6f
push eax
call sub.msvcrt.dll_sprintf
inc esi
add esp, 0x10
add esp, 0xfffffff4
push 0x2000
call fcn.00415f94
mov edx, dword [ebp - 0x2004]
mov dword [edx + esi*4], eax
push 0x42d190
push 0x404bd4
push 0x404b6f
push eax
call sub.msvcrt.dll_sprintf
inc esi
add esp, 0x20
add esp, 0xfffffff4
push 0x2000
call fcn.00415f94
mov edx, dword [ebp - 0x2004]
mov dword [edx + esi*4], eax
add esp, 0x10
cmp byte [0x42187d], 0
je 0x404e8c
mov eax, 0xffffffff
jmp 0x404e91
call fcn.00401924
push eax
push 0x404be2
push 0x404bfc
mov eax, dword [ebp - 0x2004]
push dword [eax + esi*4]
call sub.msvcrt.dll_sprintf
inc esi
add esp, 0xfffffff4
push 0x2000
call fcn.00415f94
mov edx, dword [ebp - 0x2004]
mov dword [edx + esi*4], eax
add esp, 0x20
add esp, 0xfffffff8
push 0x404c04
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 0x404c19
call sub.KERNEL32.dll_GetEnvironmentVariableA
inc esi
add esp, 0xfffffff8
push 0x404c1e
call sub.msvcrt.dll_getenv
add esp, 0x20
test eax, eax
jne 0x404f61
add esp, 0xfffffff4
push 0x2000
call fcn.00415f94
mov edx, dword [ebp - 0x2004]
mov dword [edx + esi*4], eax
call sub.KERNEL32.dll_GetConsoleOutputCP
push eax
push 0x404c26
push 0x404c3c
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.00404898
add esp, 0x10
test al, al
jne 0x404f8c
add esp, 0xfffffff4
push 0x404c46
jmp 0x404fbe
add esp, 0xfffffff4
push 0x404c5f
call fcn.00407210
add esp, 0x10
mov byte [0x421029], 1
add esp, 0xfffffff4
mov edx, dword [ebp + 8]
push edx
call fcn.004052fc
add esp, 0x10
test al, al
jne 0x404fc8
add esp, 0xfffffff4
push 0x404c6b
call fcn.004071a4
mov al, 0
jmp 0x405001
cmp byte [ebp + 0xc], 0
je 0x404ff2
add esp, 0xfffffff4
push 0x404c7f
call fcn.00407210
mov edx, dword [0x42707c]
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 0x404c88
call fcn.00407210
mov al, 1
lea esp, [ebp - 0x2028]
pop ebx
pop esi
pop edi
leave
ret