Function at 0x405610
Capabilities:
Get file size
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, 0x458
mov eax, dword [ecx + 4]
mov ebx, dword [ecx]
mov edx, dword [ecx + 8]
mov ecx, dword [ecx + 0xc]
cmp eax, 0x110
je 0x405660
cmp eax, 0x111
je 0x4058e8
cmp eax, 0x4e
je 0x4057e0
lea esp, [ebp - 0x10]
xor eax, eax
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0x10
mov dword [esp], ebx
mov edi, 1
lea ebx, [ebp - 0x436]
mov dword [esp + 4], 0x191
call dword [sym.imp.user32.dll_GetDlgItem]
mov esi, dword [sym.imp.user32.dll_SendMessageW]
mov dword [0x409440], eax
sub esp, 8
lea eax, [edi - 1]
cmp edi, 3
je 0x40572c
cmp eax, 3
je 0x405760
cmp eax, 1
je 0x405940
lea eax, [ebp - 0x238]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_GetCPInfoExW]
mov edx, ebx
lea eax, [ebp - 0x220]
sub esp, 0xc
lea esi, [esi]
movzx ecx, word [eax]
test cx, cx
je 0x4056f0
mov word [edx], cx
add eax, 2
lea ecx, [ebp - 0x24]
add edx, 2
cmp eax, ecx
jne 0x4056d8
xor eax, eax
mov word [edx], ax
mov eax, dword [0x409440]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0
mov dword [esp + 4], 0x143
mov dword [esp], eax
call esi
sub esp, 0x10
cmp edi, 4
je 0x4057a6
inc edi
lea eax, [edi - 1]
cmp edi, 3
jne 0x405696
mov eax, dword [section..data]
mov dword [esp + 0xc], 0xff
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x181
mov dword [esp], eax
call dword [sym.imp.user32.dll_LoadStringW]
sub esp, 0x10
jmp 0x405965
mov eax, dword [section..data]
mov dword [esp + 0xc], 0xff
mov dword [esp + 8], ebx
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 + 0xc], ebx
mov dword [esp + 8], 0
mov dword [esp + 4], 0x143
mov dword [esp], eax
call esi
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
call esi
xor eax, eax
sub esp, 0x10
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0x10
cmp dword [ecx + 8], 0xfffffda6
jne 0x40564d
mov ecx, dword [0x408d6c]
test ecx, ecx
je 0x40564d
mov dword [esp], ebx
lea edi, [ebp - 0x238]
call dword [sym.imp.user32.dll_GetParent]
mov esi, dword [sym.imp.user32.dll_SendMessageW]
sub esp, 4
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0x104
mov dword [esp + 4], 0x465
mov dword [esp], eax
call esi
sub esp, 0x10
mov dword [esp], edi
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 edi, eax
cmp eax, 0xffffffff
je 0x40564d
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileSize]
sub esp, 8
cmp eax, 0xffffffff
je 0x405a1e
lea edx, [ebp - 0x440]
cmp eax, 0xff
mov dword [esp], edi
lea ebx, [ebp - 0x436]
mov dword [esp + 0xc], edx
mov edx, 0xff
cmova eax, edx
mov dword [esp + 0x10], 0
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
call dword [sym.imp.kernel32.dll_ReadFile]
sub esp, 0x14
mov dword [esp], edi
test eax, eax
jne 0x40598c
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
jmp 0x40564d
cmp dx, 0x191
jne 0x40564d
shr edx, 0x10
cmp edx, 1
jne 0x40564d
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 0x40564d
mov eax, dword [section..data]
mov dword [esp + 0xc], 0xff
mov dword [esp + 8], ebx
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], ebx
inc edi
mov dword [esp + 8], 0
mov dword [esp + 4], 0x143
mov dword [esp], eax
call esi
sub esp, 0x10
jmp 0x405720
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [ebp - 0x440]
sub esp, 4
cmp eax, 2
jbe 0x4059a7
cmp word [ebx], 0xbbef
je 0x405a0c
lea edx, [ebp - 0x43c]
mov dword [esp + 4], eax
mov dword [ebp - 0x43c], 0x288
mov dword [esp + 8], edx
mov dword [esp], ebx
call dword [sym.imp.advapi32.dll_IsTextUnicode]
mov eax, dword [ebp - 0x43c]
sub esp, 0xc
test al, 8
jne 0x4059f4
and eax, 0x80
jne 0x405a00
xor edx, edx
mov dword [0x408d68], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], edx
jmp 0x4057b7
mov edx, 1
mov eax, 1
jmp 0x4059de
mov edx, 2
mov eax, 2
jmp 0x4059de
cmp byte [ebx + 2], 0xbf
jne 0x4059a7
mov edx, 3
mov eax, 3
jmp 0x4059de
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_CloseHandle]
push edx
jmp 0x40564d