Function at 0x4016a0
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 0x4016f0
cmp eax, 0x111
je 0x4019b0
cmp eax, 0x4e
je 0x4018b0
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 esi, esi
lea ebx, [ebp - 0x24]
mov dword [esp + 4], 0x191
call dword [sym.imp.user32.dll_GetDlgItem]
mov dword [global_hEncCombo], eax
sub esp, 8
cmp esi, 2
je 0x4017a4
jg 0x401818
test esi, esi
jne 0x4017d8
lea eax, [ebp - 0x238]
mov dword [esp + 4], 0
lea edi, [ebp - 0x436]
mov dword [esp + 8], eax
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_GetCPInfoExW]
mov edx, edi
lea eax, [ebp - 0x220]
sub esp, 0xc
lea esi, [esi]
movzx ecx, word [eax]
test cx, cx
je 0x40176e
add eax, 2
add edx, 2
mov word [edx - 2], cx
cmp eax, ebx
jne 0x401758
xor eax, eax
mov word [edx], ax
mov eax, dword [global_hEncCombo]
mov dword [esp + 0xc], edi
add esi, 1
mov dword [esp + 8], 0
mov dword [esp + 4], 0x143
mov dword [esp], eax
call dword [sym.imp.user32.dll_SendMessageW]
sub esp, 0x10
cmp esi, 2
jne 0x401717
mov eax, dword [0x40b020]
lea edi, [ebp - 0x436]
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 0x401773
cmp esi, 1
jne 0x401a9b
mov eax, dword [0x40b020]
lea edi, [ebp - 0x436]
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
jmp 0x401773
cmp esi, 3
jne 0x401a9b
mov eax, dword [0x40b020]
lea ebx, [ebp - 0x436]
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 [global_hEncCombo]
sub esp, 0x10
mov dword [esp + 0xc], ebx
mov ebx, dword [sym.imp.user32.dll_SendMessageW]
mov dword [esp + 8], 0
mov dword [esp + 4], 0x143
mov dword [esp], eax
call ebx
mov eax, dword [0x40bd88]
sub esp, 0x10
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 ebx
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 0x4016dd
mov ecx, dword [0x40bd8c]
test ecx, ecx
je 0x4016dd
mov dword [esp], ebx
lea esi, [ebp - 0x238]
call dword [sym.imp.user32.dll_GetParent]
mov ebx, dword [sym.imp.user32.dll_SendMessageW]
sub esp, 4
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x104
mov dword [esp + 4], 0x465
mov dword [esp], eax
call ebx
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 0x4016dd
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileSize]
sub esp, 8
cmp eax, 0xffffffff
je 0x401ab8
lea edx, [ebp - 0x440]
lea edi, [ebp - 0x436]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov edx, 0xff
cmp eax, edx
mov dword [esp + 4], edi
cmova eax, edx
mov dword [esp], esi
mov dword [esp + 8], eax
call dword [sym.imp.kernel32.dll_ReadFile]
sub esp, 0x14
mov dword [esp], esi
test eax, eax
jne 0x401a02
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
jmp 0x4016dd
cmp dx, 0x191
jne 0x4016dd
shr edx, 0x10
cmp edx, 1
jne 0x4016dd
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 dword [sym.imp.user32.dll_SendMessageW]
xor edx, edx
sub esp, 0x10
cmp eax, 0xffffffff
cmove eax, edx
mov dword [0x40bd88], eax
jmp 0x4016dd
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [ebp - 0x440]
sub esp, 4
cmp eax, 2
jbe 0x401a21
cmp word [ebp - 0x436], 0xbbef
je 0x401a86
lea edx, [ebp - 0x43c]
mov dword [esp + 4], eax
mov dword [ebp - 0x43c], 0x288
mov dword [esp + 8], edx
mov dword [esp], edi
call dword [sym.imp.advapi32.dll_IsTextUnicode]
mov eax, dword [ebp - 0x43c]
sub esp, 0xc
test al, 8
jne 0x401a6e
and eax, 0x80
jne 0x401a7a
xor edx, edx
mov dword [0x40bd88], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], edx
jmp 0x401884
mov edx, 1
mov eax, 1
jmp 0x401a58
mov edx, 2
mov eax, 2
jmp 0x401a58
cmp byte [ebp - 0x434], 0xbf
jne 0x401a21
mov edx, 3
mov eax, 3
jmp 0x401a58
mov dword [esp + 8], 0x4c
mov dword [esp + 4], str._home_ubuntu_buildbot_runners_wine_wine_src_programs_notepad_dialog.c
mov dword [esp], str.0___bad_encoding_in_load_encoding_name_
call dword [sym.imp.ucrtbase.dll__assert]
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_CloseHandle]
push edx
jmp 0x4016dd