Function at 0x40156e
Capabilities:
Read file on windows

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push ebx
push ecx
sub esp, 0xd0
mov ebx, ecx
call fcn.00402aa0
cmp dword [ebx], 2
jle 0x4015ae
mov eax, dword [ebx + 4]
mov eax, dword [eax]
mov dword [esp + 4], eax
mov dword [esp], str._info__Usage:__s__payload__n
call sub.msvcrt.dll_printf
mov eax, 1
jmp 0x401a09
call fcn.00401fb5
call fcn.0040205a
call fcn.00402060
mov dword [ebp - 0xc], 0
mov byte [ebp - 0x78], 0x2e
mov byte [ebp - 0x77], 0x72
mov byte [ebp - 0x76], 0x6f
mov byte [ebp - 0x75], 0x64
mov byte [ebp - 0x74], 0x61
mov byte [ebp - 0x73], 0x74
mov byte [ebp - 0x72], 0x61
mov byte [ebp - 0x71], 0
cmp dword [ebx], 2
jne 0x40171e
mov eax, dword [ebx + 4]
add eax, 4
mov eax, dword [eax]
mov dword [esp + 4], 0x4064f5
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x401624
mov dword [esp], str.Failed_to_fopen_payload_file
call sub.msvcrt.dll_perror
mov eax, 1
jmp 0x401a09
lea eax, [ebp - 0xb8]
mov edx, dword [ebp - 0x1c]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00401460
mov eax, dword [ebp - 0xb8]
mov dword [ebp - 0x70], eax
mov eax, dword [ebp - 0xb4]
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0xb0]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0xac]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0xa8]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0xa4]
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x9c]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x98]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x94]
mov dword [ebp - 0x4c], eax
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_fseek
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_ftell
mov dword [ebp - 0x20], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_fseek
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sub.msvcrt.dll_calloc
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x20]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_fread
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
jmp 0x40188e
mov eax, dword [ebx + 4]
mov eax, dword [eax]
mov dword [esp + 4], 0x4064f5
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x401752
mov dword [esp], str.Failed_to_fopen_loader_PE_file
call sub.msvcrt.dll_perror
mov eax, 1
jmp 0x401a09
lea eax, [ebp - 0xb8]
mov edx, dword [ebp - 0x24]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00401460
mov eax, dword [ebp - 0xb8]
mov dword [ebp - 0x70], eax
mov eax, dword [ebp - 0xb4]
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0xb0]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0xac]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0xa8]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0xa4]
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x9c]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x98]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x94]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov dword [esp], 0
call sub.KERNEL32.dll_GetModuleHandleA
sub esp, 4
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 0x3c]
mov edx, eax
mov eax, dword [ebp - 0x2c]
add eax, edx
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
add eax, 0xf8
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x10], 0
jmp 0x40187b
mov edx, dword [ebp - 0x10]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x34]
add eax, edx
mov edx, eax
lea eax, [ebp - 0x78]
mov dword [esp + 4], eax
mov dword [esp], edx
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x401877
mov dword [esp], str._info__Found_.rodata_section
call sub.msvcrt.dll_puts
mov edx, dword [ebp - 0x10]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x34]
add eax, edx
mov edx, dword [eax + 0xc]
mov eax, dword [ebp - 0x28]
add eax, edx
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
movzx eax, byte [eax]
movzx eax, al
mov dword [esp + 4], eax
mov dword [esp], str._info__Payload_PE_at_VA:_0x_.8x_n
call sub.msvcrt.dll_printf
jmp 0x40188e
add dword [ebp - 0x10], 1
mov eax, dword [ebp - 0x30]
movzx eax, word [eax + 6]
movzx eax, ax
cmp eax, dword [ebp - 0x10]
jg 0x401808
cmp dword [ebp - 0xc], 0
jne 0x4018aa
mov dword [esp], str._error__Couldnt_find_payload_PE
call sub.msvcrt.dll_puts
mov eax, 1
jmp 0x401a09
mov eax, dword [ebp - 0x70]
mov edx, dword [ebp - 0x6c]
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x70]
mov edx, dword [ebp - 0x6c]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
lea eax, [ebp - 0x70]
add eax, 8
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], 0
jmp 0x401913
lea edx, [ebp - 0x88]
mov eax, dword [ebp - 0x18]
add eax, edx
mov dword [esp + 8], eax
mov dword [esp + 4], str._2hhx
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sub.msvcrt.dll_sscanf
add dword [ebp - 0x14], 2
add dword [ebp - 0x18], 1
cmp dword [ebp - 0x18], 0xf
jbe 0x4018e9
mov dword [esp], str._info__Decrypt_PE
call sub.msvcrt.dll_puts
mov eax, dword [ebp - 0x70]
mov edx, dword [ebp - 0x6c]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0x70]
mov edx, dword [ebp - 0x6c]
mov dword [esp + 8], 3
mov dword [esp + 0xc], 0
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.00403120
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov eax, dword [ebp - 0x70]
mov edx, dword [ebp - 0x6c]
mov edx, eax
lea eax, [ebp - 0x88]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
mov eax, dword [ebp - 0x40]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call fcn.00402340
mov dword [esp], str._info__Load_PE
call sub.msvcrt.dll_puts
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call fcn.00401a13
mov dword [ebp - 0x44], eax
mov dword [esp], str._info__Calling_PE
call sub.msvcrt.dll_puts
cmp dword [ebp - 0x44], 0
je 0x4019ee
mov eax, dword [ebp - 0x44]
call eax
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, 0
lea esp, [ebp - 8]
pop ecx
pop ebx
pop ebp
lea esp, [ecx - 4]
ret