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

Disassembly:
sub esp, 0x28
push ebx
push esi
push edi
push 0x104
call fcn.0044c0d4
mov edi, eax
push 0x104
mov dword [esp + 0x14], edi
call fcn.0044c0d4
mov ebx, dword [sym.imp.USER32.dll_SendMessageA]
add esp, 8
mov dword [esp + 0x20], eax
mov eax, dword [0x477450]
push 0
push 0
push 0x184
push eax
call ebx
mov ecx, dword [0x4773cc]
push 0
push 0
push 0x190
push ecx
call ebx
mov esi, eax
test esi, esi
je 0x409240
lea edx, [esi*4]
push ebp
push edx
call fcn.0044c0d4
add esp, 4
mov ebp, eax
mov eax, dword [0x4773cc]
mov dword [esp + 0x14], ebp
push ebp
push esi
push 0x191
push eax
call ebx
mov ecx, dword [0x4773cc]
push 0
push 0
push 0xb
push ecx
call ebx
lea eax, [esi - 1]
test eax, eax
jl 0x408d7f
lea esi, [ebp + eax*4]
inc eax
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], eax
mov edx, dword [esi]
mov eax, dword [0x4773cc]
push 0
push edx
push 0x199
push eax
call ebx
mov ebp, eax
and ebp, 0x1f0000
mov dword [esp + 0x34], eax
cmp ebp, 0x40000
jb 0x408d65
cmp ebp, 0x70000
ja 0x408d65
mov ecx, dword [esi]
mov edx, dword [0x4773cc]
push edi
push ecx
push 0x189
push edx
call ebx
push 0x134
push 0x23
push edi
call fcn.00448b60
cmp eax, 6
jne 0x408d65
mov eax, dword [esp + 0x34]
push eax
call fcn.00403100
cmp eax, 1
jne 0x408cab
mov ecx, dword [esi]
mov edx, dword [0x4773cc]
push edi
push ecx
push 0x189
push edx
call ebx
mov eax, dword [0x4773dc]
push edi
push 0xffffffffffffffff
push 0x1a2
push eax
call ebx
mov edi, eax
cmp edi, 0xffffffff
je 0x408cab
mov ecx, dword [0x4773dc]
push 0
push edi
push 0x199
push ecx
call ebx
shr eax, 0x10
and eax, 0x1f
push eax
push edi
call fcn.0040b730
cmp ebp, 0x50000
je 0x408cbb
cmp ebp, 0x70000
jne 0x408cc9
mov edx, dword [esi]
mov eax, dword [0x4773cc]
push edx
push eax
call fcn.004087a0
mov edi, dword [0x477328]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [esp + 0x24]
mov edx, ecx
mov ebp, edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x10]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x45a1cc
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov eax, ebp
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.0044c687
mov esi, dword [esp + 0x24]
mov edx, dword [0x4773cc]
add esp, 4
mov ecx, dword [esi]
push 0
push ecx
push 0x182
push edx
call ebx
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
sub esi, 4
dec eax
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], eax
jne 0x408bf7
mov ebp, dword [esp + 0x14]
test ebp, ebp
je 0x408d8c
push ebp
call fcn.0044c186
add esp, 4
mov eax, dword [0x4773cc]
push 0
push 0
push 0x190
push eax
call ebx
test eax, eax
je 0x4091fa
mov ecx, dword [0x4773cc]
push 0
push 0
push 0x190
push ecx
call ebx
mov esi, eax
lea edx, [esi*4]
push edx
call fcn.0044c0d4
add esp, 4
mov ebp, eax
mov eax, dword [0x4773cc]
mov dword [esp + 0x14], ebp
push ebp
push esi
push 0x191
push eax
call ebx
mov ecx, dword [ebp]
mov edx, dword [0x4773cc]
push edi
push ecx
push 0x189
push edx
call ebx
mov eax, dword [ebp]
mov ecx, dword [0x4773cc]
push 0
push eax
push 0x199
push ecx
call ebx
mov edx, eax
and edx, 0x1f0000
cmp edx, 0x40000
jae 0x409199
test eax, 0xe00000
jbe 0x409199
mov edi, dword [ebp]
dec edi
js 0x408e66
mov eax, dword [0x4773cc]
push 0
push edi
push 0x199
push eax
call ebx
and eax, 0x1f0000
cmp eax, 0x50000
je 0x408e69
mov ecx, dword [0x4773cc]
push 0
push edi
push 0x199
push ecx
call ebx
and eax, 0x1f0000
cmp eax, 0x70000
je 0x408e69
dec edi
jns 0x408e2a
or edi, 0xffffffff
mov edx, dword [0x4773cc]
push 0
push edi
push 0x199
push edx
mov dword [esp + 0x44], edi
call ebx
mov eax, dword [ebp]
mov ecx, dword [0x4773cc]
push 0
push eax
push 0x199
push ecx
call ebx
cmp edi, 0xffffffff
mov esi, eax
jle 0x409195
mov edx, dword [0x4773cc]
push 0
push edi
push 0x199
push edx
call ebx
and eax, 0xff000000
cmp eax, 0x1000000
jne 0x408ecf
mov eax, esi
and eax, 0xffff
push eax
call fcn.00432ed0
push 1
push eax
call fcn.00438440
and esi, 0x1f0000
xor ecx, ecx
cmp esi, 0x10000
push 0x104
sete cl
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x24], 0
call fcn.0044c0d4
mov ebp, eax
push 0x104
mov dword [esp + 0x38], ebp
call fcn.0044c0d4
mov edx, dword [0x4773cc]
add esp, 8
mov dword [esp + 0x1c], eax
push 0
push edi
push 0x199
push edx
call ebx
mov eax, dword [0x4773cc]
push ebp
push edi
push 0x189
push eax
call ebx
mov edi, dword [0x477328]
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 1
mov esi, edi
mov edi, dword [esp + 0x24]
mov eax, ecx
mov edx, edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push 3
rep movsb byte es:[edi], byte [esi]
mov edi, ebp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 1
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
push 0x80000000
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x45a1cc
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x44]
push eax
call fcn.0044a650
mov esi, eax
cmp esi, 0xffffffff
je 0x408fdb
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0x17a
jae 0x40903f
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebp, dword [esp + 0x20]
mov edi, dword [esp + 0x1c]
or esi, 0xffffffff
mov eax, dword [esp + 0x30]
test eax, eax
je 0x408ff7
push eax
call fcn.0044c186
add esp, 4
test edi, edi
je 0x409004
push edi
call fcn.0044c186
add esp, 4
test ebp, ebp
je 0x409011
push ebp
call fcn.0044c186
add esp, 4
cmp esi, 0xffffffff
je 0x4091c2
test esi, esi
jl 0x40917a
mov ebp, dword [esp + 0x14]
mov ecx, dword [0x4773cc]
push 0
mov eax, dword [ebp]
push eax
push 0x182
push ecx
call ebx
jmp 0x40917e
push edi
call fcn.0044c0d4
add esp, 4
lea ecx, [esp + 0x2c]
mov ebp, eax
push 0
push ecx
push edi
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea edx, [ebp + 0x155]
push esi
mov dword [esp + 0x1c], edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp + 4]
test ecx, ecx
mov dword [esp + 0x20], 0
jbe 0x40911b
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x18]
mov dl, byte [esi]
mov al, dl
cmp dl, byte [edi]
jne 0x4090aa
test al, al
je 0x4090a6
mov dl, byte [esi + 1]
mov al, dl
cmp dl, byte [edi + 1]
jne 0x4090aa
add esi, 2
add edi, 2
test al, al
jne 0x409086
xor eax, eax
jmp 0x4090af
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4090d2
mov edi, dword [esp + 0x18]
mov al, byte [edi + 0x24]
test al, 0x20
je 0x4090c6
mov edx, dword [esp + 0x28]
test edx, edx
jne 0x4090ec
test al, 0x10
je 0x4090d2
mov eax, dword [esp + 0x28]
test eax, eax
je 0x4090ec
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x20]
add edi, 0x25
inc eax
cmp eax, ecx
mov dword [esp + 0x18], edi
mov dword [esp + 0x20], eax
jb 0x40907e
jmp 0x40911b
mov eax, dword [esp + 0x20]
inc eax
cmp eax, ecx
jae 0x409118
lea edx, [ecx + ecx*8]
lea esi, [edi + 0x25]
lea ecx, [ecx + edx*4]
lea edx, [eax + eax*8]
lea eax, [eax + edx*4]
sub ecx, eax
mov dword [esp + 0x2c], ecx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
dec dword [ebp + 4]
mov edi, dword [esp + 0x1c]
push edi
call fcn.0044c687
mov eax, dword [ebp + 4]
add esp, 4
test eax, eax
je 0x409172
push 0
push 0
push 2
push 0
push 2
push 0x40000000
push edi
mov dword [ebp], 0x20000
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
lea eax, [esp + 0x2c]
push 0
push eax
mov eax, dword [ebp + 4]
lea ecx, [eax + eax*8]
lea edx, [eax + ecx*4 + 0x155]
push edx
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp + 4]
jmp 0x408fe6
mov ebp, dword [esp + 0x14]
test esi, esi
jne 0x409195
mov edx, dword [esp + 0x34]
mov eax, dword [0x4773cc]
push esi
push edx
push 0x182
push eax
call ebx
mov edi, dword [esp + 0x10]
test ebp, ebp
je 0x4091a6
push ebp
call fcn.0044c186
add esp, 4
mov ecx, dword [0x4773cc]
push 0
push 0
push 0x190
push ecx
call ebx
test eax, eax
jne 0x408da5
jmp 0x4091fa
mov esi, dword [esp + 0x10]
mov edx, dword [0x4773fc]
push 0x104
push esi
push 0x20
push edx
call dword [sym.imp.USER32.dll_LoadStringA]
push 0x30
push 0
push esi
call fcn.00448b60
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4091f6
push eax
call fcn.0044c186
add esp, 4
mov edi, dword [esp + 0x10]
test edi, edi
pop ebp
je 0x409208
push edi
call fcn.0044c186
add esp, 4
mov eax, dword [esp + 0x20]
test eax, eax
je 0x409219
push eax
call fcn.0044c186
add esp, 4
mov eax, dword [0x4773e0]
push 1
push 0
push eax
call dword [sym.imp.USER32.dll_InvalidateRect]
mov ecx, dword [0x4773e0]
push ecx
call dword [sym.imp.USER32.dll_UpdateWindow]
call fcn.00447af0
call fcn.004365e0
pop edi
pop esi
pop ebx
add esp, 0x28
ret