Function at 0x401520
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 0x401570
cmp eax, 0x111
je 0x401768
cmp eax, 0x4e
je 0x401660
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]
lea esi, [ebp - 0x24]
mov dword [esp + 4], 0x191
call sym._GetDlgItem_8
mov dword [global_hEncCombo], eax
sub esp, 8
lea eax, [edi - 1]
cmp edi, 3
je 0x401637
cmp eax, 3
je 0x4017c0
cmp eax, 1
je 0x401848
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
nop
movzx ecx, word [eax]
test cx, cx
je 0x4015f6
add eax, 2
add edx, 2
mov word [edx - 2], cx
cmp eax, esi
jne 0x4015e0
xor eax, eax
mov word [edx], ax
mov eax, dword [global_hEncCombo]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0
mov dword [esp + 4], 0x143
mov dword [esp], eax
call sym._SendMessageW_16
sub esp, 0x10
cmp edi, 4
je 0x401808
add edi, 1
lea eax, [edi - 1]
cmp edi, 3
jne 0x4015a2
mov eax, dword [0x40a020]
mov dword [esp + 0xc], 0xff
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x181
mov dword [esp], eax
call sym._LoadStringW_16
sub esp, 0x10
jmp 0x40186c
cmp dword [ecx + 8], 0xfffffda6
jne 0x40155d
mov ecx, dword [0x40ad80]
test ecx, ecx
je 0x40155d
mov dword [esp], ebx
lea esi, [ebp - 0x238]
call sym._GetParent_4
sub esp, 4
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x104
mov dword [esp + 4], 0x465
mov dword [esp], eax
call sym._SendMessageW_16
sub esp, 0x10
mov dword [esp], esi
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 esi, eax
cmp eax, 0xffffffff
je 0x40155d
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileSize]
sub esp, 8
cmp eax, 0xffffffff
je 0x401926
lea edx, [ebp - 0x440]
cmp eax, 0xff
mov dword [esp], esi
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], esi
test eax, eax
jne 0x401895
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
jmp 0x40155d
cmp dx, 0x191
jne 0x40155d
shr edx, 0x10
cmp edx, 1
jne 0x40155d
mov eax, dword [global_hEncCombo]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x147
mov dword [esp], eax
call sym._SendMessageW_16
mov edx, 0
sub esp, 0x10
cmp eax, 0xffffffff
cmove eax, edx
mov dword [0x40ad7c], eax
jmp 0x40155d
mov eax, dword [0x40a020]
mov dword [esp + 0xc], 0xff
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x182
mov dword [esp], eax
call sym._LoadStringW_16
mov eax, dword [global_hEncCombo]
sub esp, 0x10
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0
mov dword [esp + 4], 0x143
mov dword [esp], eax
call sym._SendMessageW_16
sub esp, 0x10
mov eax, dword [0x40ad7c]
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov eax, dword [global_hEncCombo]
mov dword [esp + 4], 0x14e
mov dword [esp], eax
call sym._SendMessageW_16
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
mov eax, dword [0x40a020]
mov dword [esp + 0xc], 0xff
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x180
mov dword [esp], eax
call sym._LoadStringW_16
sub esp, 0x10
mov eax, dword [global_hEncCombo]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0
mov dword [esp + 4], 0x143
mov dword [esp], eax
call sym._SendMessageW_16
sub esp, 0x10
jmp 0x401628
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [ebp - 0x440]
sub esp, 4
cmp eax, 2
jbe 0x4018b0
cmp word [ebx], 0xbbef
je 0x401914
lea edx, [ebp - 0x43c]
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov dword [esp], ebx
mov dword [ebp - 0x43c], 0x288
call sym._IsTextUnicode_12
mov eax, dword [ebp - 0x43c]
sub esp, 0xc
test al, 8
jne 0x4018fc
and eax, 0x80
jne 0x401908
xor edx, edx
mov dword [0x40ad7c], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], edx
jmp 0x401819
mov edx, 1
mov eax, 1
jmp 0x4018e6
mov edx, 2
mov eax, 2
jmp 0x4018e6
cmp byte [ebx + 2], 0xbf
jne 0x4018b0
mov edx, 3
mov eax, 3
jmp 0x4018e6
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_CloseHandle]
push edx
jmp 0x40155d