Function at 0x405280
Capabilities:
Get common file path
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x810
mov eax, dword [0x40f1a4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 0xc]
lea eax, [ebp - 0x804]
push edi
mov edi, dword [ebp + 8]
push eax
push 0x400
mov dword [ebp - 0x80c], edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
jne 0x40530c
call dword [sym.imp.MSVCR120.dll__errno]
push dword [eax]
call dword [sym.imp.MSVCR120.dll_strerror]
add esp, 4
push eax
push str.could_not_identify_current_directory:__s
call sub.libintl_8.dll_libintl_gettext
mov esi, dword [sym.imp.MSVCR120.dll___iob_func]
add esp, 4
push eax
call esi
add eax, 0x40
push eax
call fcn.00407600
call esi
add eax, 0x40
push eax
push 0xa
call dword [sym.imp.MSVCR120.dll_fputc]
add esp, 0x14
or eax, 0xffffffff
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00409cf2
mov esp, ebp
pop ebp
ret
push edi
call fcn.00406480
add esp, 4
test eax, eax
je 0x4053d9
mov al, byte [edi]
cmp al, 0x2f
je 0x405359
cmp al, 0x5c
je 0x405359
movzx eax, al
push eax
call dword [sym.imp.MSVCR120.dll_isalpha]
add esp, 4
test eax, eax
je 0x405349
cmp byte [edi + 1], 0x3a
jne 0x405349
mov al, byte [edi + 2]
cmp al, 0x2f
je 0x405359
cmp al, 0x5c
je 0x405359
push edi
lea eax, [ebp - 0x804]
push eax
push esi
call fcn.00406510
jmp 0x40536d
push 0x400
push edi
push esi
call dword [sym.imp.MSVCR120.dll_strncpy]
mov byte [esi + 0x3ff], 0
add esp, 0xc
push esi
call fcn.004065c0
push esi
call fcn.00405a00
add esp, 8
test eax, eax
jne 0x405395
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00409cf2
mov esp, ebp
pop ebp
ret
push esi
push str.invalid_binary___s_
call sub.libintl_8.dll_libintl_gettext
mov esi, dword [sym.imp.MSVCR120.dll___iob_func]
add esp, 4
push eax
call esi
add eax, 0x40
push eax
call fcn.00407600
call esi
add eax, 0x40
push eax
push 0xa
call dword [sym.imp.MSVCR120.dll_fputc]
add esp, 0x14
or eax, 0xffffffff
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00409cf2
mov esp, ebp
pop ebp
ret
push edi
lea eax, [ebp - 0x804]
push eax
push esi
call fcn.00406510
push esi
call fcn.00405a00
add esp, 0x10
test eax, eax
je 0x405383
push ebx
push str.PATH
call dword [sym.imp.MSVCR120.dll_getenv]
mov ebx, dword [sym.imp.MSVCR120.dll___iob_func]
mov ecx, eax
add esp, 4
mov dword [ebp - 0x810], ecx
test ecx, ecx
je 0x405577
cmp byte [ecx], 0
je 0x405577
xor ebx, ebx
xor eax, eax
test ebx, ebx
mov ebx, ecx
je 0x40542f
lea ebx, [eax + 1]
push ebx
call fcn.004064e0
add esp, 4
mov dword [ebp - 0x808], eax
test eax, eax
jne 0x405459
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405447
sub ecx, edx
lea eax, [ecx + ebx]
mov dword [ebp - 0x808], eax
sub eax, ebx
lea edi, [eax + 1]
cmp edi, 0x400
jge 0x40546c
test edi, edi
je 0x40548b
jmp 0x405471
mov edi, 0x400
push edi
lea eax, [ebp - 0x404]
push ebx
push eax
call dword [sym.imp.MSVCR120.dll_strncpy]
add esp, 0xc
mov byte [ebp + edi - 0x405], 0
mov al, byte [ebp - 0x404]
cmp al, 0x2f
je 0x4054e8
cmp al, 0x5c
je 0x4054e8
movzx eax, al
push eax
call dword [sym.imp.MSVCR120.dll_isalpha]
add esp, 4
test eax, eax
je 0x4054c1
cmp byte [ebp - 0x403], 0x3a
jne 0x4054c1
mov al, byte [ebp - 0x402]
cmp al, 0x2f
je 0x4054e8
cmp al, 0x5c
je 0x4054e8
lea eax, [ebp - 0x404]
push eax
lea eax, [ebp - 0x804]
push eax
push esi
call fcn.00406510
mov edi, dword [ebp - 0x80c]
push edi
push esi
push esi
call fcn.00406510
add esp, 0x18
jmp 0x4054ff
mov edi, dword [ebp - 0x80c]
lea eax, [ebp - 0x404]
push edi
push eax
push esi
call fcn.00406510
add esp, 0xc
push esi
call fcn.004065c0
push esi
call fcn.00405a00
add esp, 8
cmp eax, 0xfffffffe
je 0x405528
test eax, eax
jne 0x40555b
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00409cf2
mov esp, ebp
pop ebp
ret
push esi
push str.could_not_read_binary___s_
call sub.libintl_8.dll_libintl_gettext
add esp, 4
push eax
call dword [sym.imp.MSVCR120.dll___iob_func]
add eax, 0x40
push eax
call fcn.00407600
call dword [sym.imp.MSVCR120.dll___iob_func]
add eax, 0x40
push eax
push 0xa
call dword [sym.imp.MSVCR120.dll_fputc]
add esp, 0x14
mov eax, dword [ebp - 0x808]
cmp byte [eax], 0
je 0x405571
mov ecx, dword [ebp - 0x810]
jmp 0x405426
mov ebx, dword [sym.imp.MSVCR120.dll___iob_func]
push edi
push str.could_not_find_a___s__to_execute
call sub.libintl_8.dll_libintl_gettext
add esp, 4
push eax
call ebx
add eax, 0x40
push eax
call fcn.00407600
call ebx
add eax, 0x40
push eax
push 0xa
call dword [sym.imp.MSVCR120.dll_fputc]
mov ecx, dword [ebp - 4]
add esp, 0x14
xor ecx, ebp
or eax, 0xffffffff
pop ebx
pop edi
pop esi
call fcn.00409cf2
mov esp, ebp
pop ebp
ret