Function at 0x401380
Capabilities:
Read file on windows

Disassembly:
push edi
lea edi, [esp + 8]
and esp, 0xfffffff8
push dword [edi - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x100
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0x80000000
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CreateFileW]
sub esp, 0x1c
cmp eax, 0xffffffff
je 0x4015e0
mov edi, eax
lea eax, [ebp - 0xe8]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
lea eax, [ebp - 0xe1]
mov dword [esp + 8], 5
mov dword [esp + 4], eax
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_ReadFile]
mov esi, dword [sym.imp.kernel32.dll_SetFilePointer]
sub esp, 0x14
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], edi
call esi
mov eax, dword [ebp - 0xe8]
sub esp, 0x10
cmp eax, 1
jbe 0x4015d0
cmp byte [ebp - 0xe1], 0xff
je 0x401630
cmp eax, 4
jbe 0x4015d0
cmp dword [ebp - 0xe1], 0x74725c7b
je 0x401670
cmp dword [ebp - 0xe1], 0xe011cfd0
mov dword [ebp - 0xec], 1
je 0x40168c
mov eax, 1
mov esi, dword [sym.imp.user32.dll_SendMessageW]
movq xmm0, qword [0x411d50]
mov dword [ebp - 0xdc], edi
mov word [ebp - 0xb8], ax
lea eax, [ebp - 0xd0]
mov dword [esp + 0xc], eax
mov eax, dword [0x423724]
movq qword [ebp - 0xd0], xmm0
mov dword [ebp - 0xd4], sym._stream_in_16
mov dword [esp + 8], 0
mov dword [esp + 4], 0x447
mov dword [esp], eax
call esi
mov eax, dword [ebp - 0xec]
sub esp, 0x10
mov dword [0x40f284], eax
call sym._set_bar_states
call sym._set_default_font
mov eax, dword [0x40f284]
mov dword [esp], eax
call sym._reg_formatindex
mov eax, dword [eax*4 + 0x423710]
mov dword [esp + 4], eax
mov eax, dword [0x423728]
mov dword [esp], eax
call sym._target_device
lea eax, [ebp - 0xdc]
mov dword [esp + 4], 0x449
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0xec]
mov dword [esp + 8], eax
mov eax, dword [0x423724]
mov dword [esp], eax
call esi
sub esp, 0x10
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [0x423724]
sub esp, 4
mov dword [esp], eax
call dword [sym.imp.user32.dll_SetFocus]
mov eax, ebx
sub esp, 4
call sym._set_caption
xor eax, eax
lea esi, [esi]
nop
movzx edx, word [ebx + eax]
add eax, 2
mov word [eax + 0x4234fe], dx
test dx, dx
jne 0x401570
mov eax, dword [0x423724]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0xb9
mov dword [esp], eax
call esi
mov eax, dword [0x423728]
sub esp, 0x10
mov dword [esp + 4], eax
mov dword [esp], ebx
call sym._registry_set_filelist
call sym._update_font_list
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
lea esp, [edi - 8]
pop edi
ret
mov dword [ebp - 0xec], 1
jmp 0x401485
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 5
mov dword [esp + 0xc], 0x30
sete al
mov dword [esp + 8], 0x411758
movzx eax, al
add eax, 0x6ad
mov dword [esp + 4], eax
mov eax, dword [0x423728]
mov dword [esp], eax
call dword [sym.imp.user32.dll_MessageBoxW]
sub esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
lea esp, [edi - 8]
pop edi
ret
cmp byte [ebp - 0xe0], 0xfe
jne 0x401452
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 2
mov dword [esp], edi
call esi
mov dword [ebp - 0xec], 0x11
sub esp, 0x10
jmp 0x401485
cmp byte [ebp - 0xdd], 0x66
jne 0x40146b
mov dword [ebp - 0xec], 2
jmp 0x401485
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [0x423728]
mov dword [ebp - 0xd0], 0x28
sub esp, 4
mov dword [ebp - 0xcc], eax
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
mov dword [ebp - 0xc4], 0x6aa
mov dword [ebp - 0xc8], eax
sub esp, 4
lea eax, [ebp - 0xd0]
mov dword [ebp - 0xc0], 0x411758
mov dword [ebp - 0xbc], 0x30
mov dword [ebp - 0xb8], 0
mov dword [ebp - 0xb4], 0
mov dword [ebp - 0xb0], 0
mov dword [ebp - 0xac], 0
mov dword [esp], eax
call dword [sym.imp.user32.dll_MessageBoxIndirectW]
sub esp, 4
jmp 0x4015be