Function at 0x401660
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 0x4016b0
cmp eax, 0x111
je 0x401960
cmp eax, 0x4e
je 0x401860
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
xor edi, edi
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 [global_hEncCombo], eax
sub esp, 8
cmp edi, 2
je 0x4017b3
cmp edi, 3
je 0x4017e0
cmp edi, 1
je 0x401761
lea eax, [ebp - 0x238]
mov dword [esp + 4], 0
lea edi, [ebp - 0x23a]
mov dword [esp + 8], eax
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_GetCPInfoExW]
mov eax, ebx
lea edx, [ebp - 0x220]
sub esp, 0xc
jmp 0x40172e
add eax, 2
add edx, 2
mov word [eax - 2], cx
cmp eax, edi
je 0x401736
movzx ecx, word [edx]
test cx, cx
jne 0x401720
xor ecx, ecx
mov edi, 1
mov word [eax], cx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0
mov dword [esp + 4], 0x143
mov eax, dword [global_hEncCombo]
mov dword [esp], eax
call esi
sub esp, 0x10
mov dword [esp + 0xc], 0xff
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x180
mov eax, dword [0x40b020]
mov dword [esp], eax
call dword [sym.imp.user32.dll_LoadStringW]
sub esp, 0x10
mov dword [esp + 0xc], ebx
add edi, 1
mov dword [esp + 8], 0
mov dword [esp + 4], 0x143
mov eax, dword [global_hEncCombo]
mov dword [esp], eax
call esi
sub esp, 0x10
cmp edi, 2
jne 0x4016e0
mov dword [esp + 0xc], 0xff
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x181
mov eax, dword [0x40b020]
mov dword [esp], eax
call dword [sym.imp.user32.dll_LoadStringW]
sub esp, 0x10
jmp 0x401786
mov dword [esp + 0xc], 0xff
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x182
mov eax, dword [0x40b020]
mov dword [esp], eax
call dword [sym.imp.user32.dll_LoadStringW]
sub esp, 0x10
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0
mov dword [esp + 4], 0x143
mov eax, dword [global_hEncCombo]
mov dword [esp], eax
call esi
sub esp, 0x10
mov dword [esp + 0xc], 0
mov eax, dword [0x40bd88]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x14e
mov eax, dword [global_hEncCombo]
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 0x40169d
mov edx, dword [0x40bd8c]
test edx, edx
je 0x40169d
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 0x40169d
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileSize]
sub esp, 8
cmp eax, 0xffffffff
je 0x401a3e
lea edx, [ebp - 0x440]
lea ebx, [ebp - 0x436]
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 0x4019b2
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
jmp 0x40169d
cmp dx, 0x191
jne 0x40169d
shr edx, 0x10
cmp edx, 1
jne 0x40169d
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x147
mov eax, dword [global_hEncCombo]
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 [0x40bd88], eax
jmp 0x40169d
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [ebp - 0x440]
sub esp, 4
cmp eax, 2
jbe 0x4019d1
cmp word [ebp - 0x436], 0xbbef
je 0x401a29
mov dword [ebp - 0x43c], 0x288
lea edx, [ebp - 0x43c]
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 - 0x43c]
sub esp, 0xc
test al, 8
jne 0x401a1d
shr eax, 6
and eax, 2
mov edx, eax
mov dword [0x40bd88], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], edx
jmp 0x401837
mov edx, 1
mov eax, 1
jmp 0x401a07
cmp byte [ebp - 0x434], 0xbf
jne 0x4019d1
mov edx, 3
mov eax, 3
jmp 0x401a07
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_CloseHandle]
push eax
jmp 0x40169d