Function at 0x401400
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x444
mov eax, dword [ebp + 0xc]
cmp eax, 0x110
je 0x401490
cmp eax, 0x111
je 0x401440
cmp eax, 0x4e
jne 0x401432
mov eax, dword [ebp + 0x14]
cmp dword [eax + 8], 0xfffffda6
je 0x401630
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret 0x10
cmp word [ebp + 0x10], 0x191
jne 0x401432
mov eax, dword [ebp + 0x10]
shr eax, 0x10
cmp eax, 1
jne 0x401432
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x147
mov eax, dword [section..bss]
mov dword [esp], eax
call dword [sym.imp.user32.dll_SendMessageW]
xor edx, edx
sub esp, 0x10
cmp eax, 0xffffffff
cmove eax, edx
mov dword [0x40cd88], eax
jmp 0x401432
mov dword [esp + 4], 0x191
mov eax, dword [ebp + 8]
lea ebx, [ebp - 0x42a]
lea esi, [ebp - 0x18]
mov dword [esp], eax
call dword [sym.imp.user32.dll_GetDlgItem]
mov dword [section..bss], eax
sub esp, 8
lea eax, [ebp - 0x22c]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_GetCPInfoExW]
mov edx, ebx
lea eax, [ebp - 0x214]
sub esp, 0xc
jmp 0x4014f6
add eax, 2
add edx, 2
mov word [edx - 2], cx
cmp eax, esi
je 0x4014fe
movzx ecx, word [eax]
test cx, cx
jne 0x4014e8
xor ecx, ecx
mov esi, dword [sym.imp.user32.dll_SendMessageW]
mov word [edx], cx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0
mov dword [esp + 4], 0x143
mov eax, dword [section..bss]
mov dword [esp], eax
call esi
mov edi, dword [sym.imp.user32.dll_LoadStringW]
sub esp, 0x10
mov dword [esp + 0xc], 0xff
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x180
mov eax, dword [0x40c020]
mov dword [esp], eax
call edi
sub esp, 0x10
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0
mov dword [esp + 4], 0x143
mov eax, dword [section..bss]
mov dword [esp], eax
call esi
sub esp, 0x10
mov dword [esp + 0xc], 0xff
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x181
mov eax, dword [0x40c020]
mov dword [esp], eax
call edi
sub esp, 0x10
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0
mov dword [esp + 4], 0x143
mov eax, dword [section..bss]
mov dword [esp], eax
call esi
sub esp, 0x10
mov dword [esp + 0xc], 0xff
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x182
mov eax, dword [0x40c020]
mov dword [esp], eax
call edi
sub esp, 0x10
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0
mov dword [esp + 4], 0x143
mov eax, dword [section..bss]
mov dword [esp], eax
call esi
sub esp, 0x10
mov dword [esp + 0xc], 0
mov eax, dword [0x40cd88]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x14e
mov eax, dword [section..bss]
mov dword [esp], eax
call esi
xor eax, eax
sub esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 0x10
mov edx, dword [0x40cd8c]
test edx, edx
je 0x401432
mov eax, dword [ebp + 8]
lea ebx, [ebp - 0x22c]
mov dword [esp], eax
call dword [sym.imp.user32.dll_GetParent]
mov esi, dword [sym.imp.user32.dll_SendMessageW]
sub esp, 4
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x104
mov dword [esp + 4], 0x465
mov dword [esp], eax
call esi
sub esp, 0x10
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], ebx
call dword [sym.imp.kernel32.dll_CreateFileW]
sub esp, 0x1c
mov edi, eax
cmp eax, 0xffffffff
je 0x401432
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileSize]
sub esp, 8
cmp eax, 0xffffffff
je 0x4017b0
lea edx, [ebp - 0x434]
lea ebx, [ebp - 0x42a]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov edx, 0xff
cmp eax, edx
mov dword [esp + 4], ebx
cmova eax, edx
mov dword [esp], edi
mov dword [esp + 8], eax
call dword [sym.imp.kernel32.dll_ReadFile]
sub esp, 0x14
mov dword [esp], edi
test eax, eax
jne 0x401724
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
jmp 0x401432
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [ebp - 0x434]
sub esp, 4
cmp eax, 2
jbe 0x401743
cmp word [ebp - 0x42a], 0xbbef
je 0x40179b
mov dword [ebp - 0x430], 0x288
lea edx, [ebp - 0x430]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.advapi32.dll_IsTextUnicode]
mov eax, dword [ebp - 0x430]
sub esp, 0xc
test al, 8
jne 0x40178f
shr eax, 6
and eax, 2
mov edx, eax
mov dword [0x40cd88], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], edx
jmp 0x401607
mov edx, 1
mov eax, 1
jmp 0x401779
cmp byte [ebp - 0x428], 0xbf
jne 0x401743
mov edx, 3
mov eax, 3
jmp 0x401779
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_CloseHandle]
push eax
jmp 0x401432