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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x448
mov eax, dword [ebp + 0xc]
cmp eax, 0x110
je 0x4055e0
cmp eax, 0x111
je 0x405880
cmp eax, 0x4e
je 0x405770
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret 0x10
mov eax, dword [ebp + 8]
mov ebx, 1
lea edi, [ebp - 0x42a]
lea esi, [ebp - 0x18]
mov dword [esp + 4], 0x191
mov dword [esp], eax
call dword [sym.imp.user32.dll_GetDlgItem]
mov dword [0x409440], eax
mov eax, dword [sym.imp.user32.dll_SendMessageW]
sub esp, 8
mov dword [ebp - 0x438], eax
lea eax, [ebx - 1]
cmp ebx, 3
je 0x4056b8
cmp eax, 3
je 0x4056e8
cmp eax, 1
je 0x4058e0
lea eax, [ebp - 0x22c]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_GetCPInfoExW]
mov edx, edi
lea eax, [ebp - 0x214]
sub esp, 0xc
lea esi, [esi]
movzx ecx, word [eax]
test cx, cx
je 0x405676
add eax, 2
add edx, 2
mov word [edx - 2], cx
cmp eax, esi
jne 0x405660
xor eax, eax
mov word [edx], ax
mov eax, dword [0x409440]
mov dword [esp + 0xc], edi
mov dword [esp], eax
mov eax, dword [ebp - 0x438]
mov dword [esp + 8], 0
mov dword [esp + 4], 0x143
call eax
sub esp, 0x10
cmp ebx, 4
je 0x405734
inc ebx
lea eax, [ebx - 1]
cmp ebx, 3
jne 0x405621
mov eax, dword [section..data]
mov dword [esp + 0xc], 0xff
mov dword [esp + 8], edi
mov dword [esp + 4], 0x181
mov dword [esp], eax
call dword [sym.imp.user32.dll_LoadStringW]
sub esp, 0x10
jmp 0x405905
mov eax, dword [section..data]
mov dword [esp + 0xc], 0xff
mov dword [esp + 8], edi
mov dword [esp + 4], 0x182
mov dword [esp], eax
call dword [sym.imp.user32.dll_LoadStringW]
mov eax, dword [0x409440]
sub esp, 0x10
mov dword [esp], eax
mov eax, dword [ebp - 0x438]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0
mov dword [esp + 4], 0x143
call eax
sub esp, 0x10
mov eax, dword [0x408d68]
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov eax, dword [0x409440]
mov dword [esp + 4], 0x14e
mov dword [esp], eax
mov eax, dword [ebp - 0x438]
call eax
xor eax, eax
sub esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 0x10
mov eax, dword [ebp + 0x14]
cmp dword [eax + 8], 0xfffffda6
jne 0x4055ca
mov ecx, dword [0x408d6c]
test ecx, ecx
je 0x4055ca
mov eax, dword [ebp + 8]
lea ebx, [ebp - 0x22c]
mov dword [esp], eax
call dword [sym.imp.user32.dll_GetParent]
sub esp, 4
mov dword [esp], eax
mov eax, dword [sym.imp.user32.dll_SendMessageW]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x104
mov dword [esp + 4], 0x465
mov dword [ebp - 0x438], eax
call eax
sub esp, 0x10
mov dword [esp], ebx
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
call dword [sym.imp.kernel32.dll_CreateFileW]
sub esp, 0x1c
mov ebx, eax
cmp eax, 0xffffffff
je 0x4055ca
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileSize]
sub esp, 8
cmp eax, 0xffffffff
je 0x4059c4
lea edx, [ebp - 0x434]
cmp eax, 0xff
mov dword [esp], ebx
lea edi, [ebp - 0x42a]
mov dword [esp + 0xc], edx
mov edx, 0xff
cmova eax, edx
mov dword [esp + 0x10], 0
mov dword [esp + 4], edi
mov dword [esp + 8], eax
call dword [sym.imp.kernel32.dll_ReadFile]
sub esp, 0x14
mov dword [esp], ebx
test eax, eax
jne 0x405932
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
jmp 0x4055ca
cmp word [ebp + 0x10], 0x191
jne 0x4055ca
mov eax, dword [ebp + 0x10]
shr eax, 0x10
cmp eax, 1
jne 0x4055ca
mov eax, dword [0x409440]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x147
mov dword [esp], eax
call dword [sym.imp.user32.dll_SendMessageW]
mov edx, 0
sub esp, 0x10
cmp eax, 0xffffffff
cmove eax, edx
mov dword [0x408d68], eax
jmp 0x4055ca
mov eax, dword [section..data]
mov dword [esp + 0xc], 0xff
mov dword [esp + 8], edi
mov dword [esp + 4], 0x180
mov dword [esp], eax
call dword [sym.imp.user32.dll_LoadStringW]
sub esp, 0x10
mov eax, dword [0x409440]
mov dword [esp + 0xc], edi
inc ebx
mov dword [esp + 8], 0
mov dword [esp], eax
mov eax, dword [ebp - 0x438]
mov dword [esp + 4], 0x143
call eax
sub esp, 0x10
jmp 0x4056ac
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [ebp - 0x434]
sub esp, 4
cmp eax, 2
jbe 0x40594d
cmp word [edi], 0xbbef
je 0x4059b2
lea edx, [ebp - 0x430]
mov dword [esp + 4], eax
mov dword [ebp - 0x430], 0x288
mov dword [esp + 8], edx
mov dword [esp], edi
call dword [sym.imp.advapi32.dll_IsTextUnicode]
mov eax, dword [ebp - 0x430]
sub esp, 0xc
test al, 8
jne 0x40599a
and eax, 0x80
jne 0x4059a6
xor edx, edx
mov dword [0x408d68], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], edx
jmp 0x405745
mov edx, 1
mov eax, 1
jmp 0x405984
mov edx, 2
mov eax, 2
jmp 0x405984
cmp byte [edi + 2], 0xbf
jne 0x40594d
mov edx, 3
mov eax, 3
jmp 0x405984
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
push edx
jmp 0x4055ca