Function at 0x4218f9
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push 0x2e0
mov eax, 0x46d480
call fcn.0045f3fe
mov esi, ecx
push 0x130
push dword [esi + 4]
mov dword [ebp - 0x29c], esi
call dword [sym.imp.USER32.dll_GetDlgItem]
mov ebx, eax
add esi, 0x2fc
mov dword [ebp - 0x2a8], ebx
call fcn.00422064
push 0x12c8
lea eax, [ebp - 0x238]
push eax
call fcn.0044bdfb
xor ebx, ebx
mov dword [ebp - 4], ebx
cmp dword [eax + 0x18], 8
jb 0x421952
mov eax, dword [eax + 4]
jmp 0x421955
add eax, 4
mov dword [ebp - 0x298], eax
cmp eax, ebx
je 0x42199d
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jg 0x42199d
lea edi, [eax + eax]
mov eax, edi
call fcn.00445540
mov esi, esp
cmp esi, ebx
je 0x42199d
push ebx
push ebx
push edi
push esi
push 0xffffffffffffffff
push dword [ebp - 0x298]
mov byte [esi], bl
push ebx
push 3
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
neg eax
sbb eax, eax
and eax, esi
jmp 0x42199f
xor eax, eax
push eax
call fcn.0043fb2b
pop ecx
mov esi, eax
or dword [ebp - 4], 0xffffffff
xor edi, edi
push ebx
inc edi
push edi
lea ecx, [ebp - 0x238]
call fcn.00411dad
cmp esi, ebx
jne 0x4219c3
push 8
pop esi
push 8
mov dword [ebp - 0x294], 0x5c
call dword [sym.imp.USER32.dll_GetSysColor]
mov dword [ebp - 0x280], eax
push 0x120c
lea eax, [ebp - 0x238]
push eax
call fcn.0044bdfb
mov dword [ebp - 4], edi
cmp dword [eax + 0x18], 8
jb 0x4219fa
mov eax, dword [eax + 4]
jmp 0x4219fd
add eax, 4
push eax
lea eax, [ebp - 0x27a]
push 0x20
push eax
call fcn.0043e613
add esp, 0xc
or dword [ebp - 4], 0xffffffff
push ebx
push edi
lea ecx, [ebp - 0x238]
call fcn.00411dad
imul esi, esi, 0x14
lea eax, [ebp - 0x294]
push eax
push edi
push 0x444
push dword [ebp - 0x2a8]
mov dword [ebp - 0x288], esi
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
mov dword [ebp - 0x290], 0xe0000001
mov dword [ebp - 0x28c], ebx
call esi
push ebx
push edi
push 0x443
push dword [ebp - 0x2a8]
call esi
mov esi, dword [ebp - 0x29c]
add esi, 0x2c4
cmp dword [esi + 0x18], 8
jb 0x421a7a
mov eax, dword [esi + 4]
jmp 0x421a7d
lea eax, [esi + 4]
push ebx
push 0x80
push 3
push ebx
push edi
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x298], eax
cmp eax, 0xffffffff
jne 0x421b6d
lea ecx, [ebp - 0x238]
call fcn.00411d68
mov dword [ebp - 4], 2
mov ecx, dword [0x481204]
lea eax, [ebp - 0x238]
push eax
push 0x1d
pop eax
call fcn.0041badf
push 0x40dd84
lea ecx, [ebp - 0x2d0]
call fcn.004132cd
mov byte [ebp - 4], 3
push eax
lea eax, [ebp - 0x238]
push eax
lea eax, [ebp - 0x2ec]
push eax
call fcn.00419205
add esp, 0xc
mov byte [ebp - 4], 4
push eax
mov ecx, esi
call fcn.00411d93
mov byte [ebp - 4], 3
push ebx
push edi
lea ecx, [ebp - 0x2ec]
call fcn.00411dad
mov byte [ebp - 4], 2
push ebx
push edi
lea ecx, [ebp - 0x2d0]
call fcn.00411dad
cmp dword [esi + 0x18], 8
jb 0x421b2d
mov eax, dword [esi + 4]
jmp 0x421b30
lea eax, [esi + 4]
push ebx
push 0x80
push 3
push ebx
push edi
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x298], eax
or dword [ebp - 4], 0xffffffff
push ebx
push edi
lea ecx, [ebp - 0x238]
call fcn.00411dad
cmp dword [ebp - 0x298], 0xffffffff
jne 0x421b6d
xor al, al
jmp 0x421e07
push ebx
push dword [ebp - 0x298]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x2a4], eax
add eax, 2
push eax
call fcn.0043e603
mov dword [ebp - 0x2a0], eax
mov eax, dword [ebp - 0x2a4]
add eax, 2
push eax
push ebx
push dword [ebp - 0x2a0]
call fcn.004433d0
add esp, 0x10
push ebx
lea eax, [ebp - 0x2b0]
push eax
push dword [ebp - 0x2a4]
push dword [ebp - 0x2a0]
push dword [ebp - 0x298]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x421be6
push dword [ebp - 0x298]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x2a0]
call fcn.0043e687
pop ecx
jmp 0x421b66
mov eax, dword [ebp - 0x2a0]
mov ecx, 0xfeff
cmp word [eax], cx
jne 0x421da8
mov esi, dword [ebp - 0x2b0]
add eax, 2
shr esi, 1
dec esi
mov dword [ebp - 0x2a4], eax
mov dword [ebp - 0x2ac], esi
call fcn.0041aa92
cmp eax, edi
jne 0x421dcd
xor eax, eax
push 0x20a
mov word [ebp - 0x21c], ax
lea eax, [ebp - 0x21a]
push ebx
push eax
call fcn.004433d0
add esp, 0xc
lea eax, [ebp - 0x21c]
push eax
push 0x105
call fcn.00451340
test eax, eax
je 0x421cdf
lea esi, [ebp - 0x21c]
call fcn.0041a4f3
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x421c66
mov esi, dword [ebp - 0x29c]
sub eax, edx
sar eax, 1
mov ecx, 0x104
add esi, 0x2e0
sub ecx, eax
je 0x421cae
cmp dword [esi + 0x18], 8
jb 0x421c94
mov eax, dword [esi + 4]
jmp 0x421c97
lea eax, [esi + 4]
push eax
lea eax, [ebp - 0x21c]
push 0x106
push eax
call fcn.0043efc4
add esp, 0xc
jmp 0x421ccb
cmp dword [esi + 0x18], 8
jb 0x421cb9
mov eax, dword [esi + 4]
jmp 0x421cbc
lea eax, [esi + 4]
push eax
lea eax, [ebp - 0x21c]
push eax
call fcn.0041af48
pop ecx
pop ecx
lea eax, [ebp - 0x21c]
push eax
mov ecx, esi
call fcn.00413ccf
mov esi, dword [ebp - 0x2ac]
mov eax, dword [ebp - 0x29c]
add eax, 0x2e0
cmp dword [eax + 0x18], 8
jb 0x421cf5
mov eax, dword [eax + 4]
jmp 0x421cf8
add eax, 4
push ebx
push 0x80000080
push 2
push ebx
push 3
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x29c], eax
cmp eax, 0xffffffff
je 0x421b66
lea esi, [esi + esi + 2]
push esi
call fcn.0043e603
push esi
mov edi, eax
push ebx
push edi
call fcn.004433d0
add esp, 0x10
push ebx
push ebx
push esi
push edi
push 0xffffffffffffffff
push dword [ebp - 0x2a4]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov eax, edi
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x421d4e
sub eax, esi
jne 0x421d67
cmp edi, ebx
je 0x421b66
push edi
jmp 0x421bde
push ebx
lea ecx, [ebp - 0x2b4]
push ecx
push eax
push edi
push dword [ebp - 0x29c]
mov dword [ebp - 0x2b4], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x29c]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push dword [ebp - 0x29c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, ebx
je 0x421dcd
push edi
call fcn.0043e687
pop ecx
jmp 0x421dcd
push eax
mov dword [ebp - 0x2a4], eax
call fcn.0043e687
pop ecx
mov ecx, dword [ebp - 0x29c]
push esi
add ecx, 0x2e0
mov dword [ebp - 0x2a0], ebx
call fcn.00411d93
push dword [ebp - 0x2a4]
push ebx
push 0xc2
push dword [ebp - 0x2a8]
call dword [sym.imp.USER32.dll_SendMessageW]
cmp dword [ebp - 0x2a0], ebx
je 0x421df9
push dword [ebp - 0x2a0]
call fcn.0043e687
pop ecx
push dword [ebp - 0x298]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
lea esp, [ebp - 0x2fc]
call fcn.0045f490
ret