Function at 0x410eeb
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
mov dword [ebp - 0x14], 0
mov eax, dword [ebp + 8]
mov dword [ebp - 0x20], eax
jmp 0x41126c
push 0x42b630
push 0x431388
push 0x22
call fcn.004093aa
add esp, 0xc
xor eax, eax
mov al, byte [0x42cc08]
cmp eax, dword [0x42cbf8]
je 0x410f3c
push 1
push 0x42f5b0
call fcn.004081d7
add esp, 8
dec byte [0x42cc08]
push 0
call fcn.0040fe60
add esp, 4
jmp case.default.0x41127c
push 0x42b630
push 0x430810
push 0x22
call fcn.004093aa
add esp, 0xc
xor eax, eax
mov al, byte [0x42cc08]
cmp eax, dword [0x42cbf8]
je 0x410f87
push 1
push 0x42f5b0
call fcn.004081d7
add esp, 8
mov al, byte [0x42cbf8]
mov byte [0x42c0ec], al
push 0
call fcn.0040fe60
add esp, 4
jmp case.default.0x41127c
push 0x42b630
push 0x430810
push 0x22
call fcn.004093aa
add esp, 0xc
xor eax, eax
mov al, byte [0x42cc08]
inc eax
cmp eax, dword [0x42cbf8]
je 0x410fd7
push 1
push 0x42f5b0
call fcn.004081d7
add esp, 8
mov al, byte [0x42cbf8]
mov byte [0x42cc08], al
push 0
call fcn.0040fe60
add esp, 4
inc dword [0x42b130]
xor eax, eax
mov al, byte [0x42c0b0]
cmp eax, 0xa
je 0x411011
xor eax, eax
mov al, byte [0x42c0b0]
cmp eax, 0xb
jne 0x41102a
inc dword [0x42c20c]
cmp dword [0x42c200], 0
je 0x41102a
inc dword [0x42b528]
jmp case.default.0x41127c
push 0x42b630
push 0x430f50
push 0x22
call fcn.004093aa
add esp, 0xc
push 0x800
mov eax, dword [0x42b854]
push eax
mov eax, dword [0x42b420]
push eax
call fcn.00419717
add esp, 0xc
mov eax, dword [0x42c208]
push eax
call fcn.00419677
add esp, 4
mov dword [ebp - 0x18], eax
mov eax, dword [0x42c208]
push eax
push 0
mov eax, dword [ebp - 0x18]
push eax
call fcn.0041eba2
add esp, 0xc
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.MSVCRT20.dll_free]
add esp, 4
mov word [0x42b5fc], 0
xor eax, eax
mov al, byte [0x42c210]
and al, 0xef
mov byte [0x42c210], al
call fcn.0040eea9
push 0x800
mov eax, dword [0x42b420]
push eax
mov eax, dword [0x42b854]
push eax
call fcn.00419717
add esp, 0xc
cmp dword [0x42cc80], 0
je 0x411102
mov eax, dword [0x42b854]
push eax
call fcn.00419677
add esp, 4
mov dword [ebp - 0x18], eax
mov eax, dword [0x42b854]
push eax
push 0
mov eax, dword [ebp - 0x18]
push eax
call fcn.0041eba2
add esp, 0xc
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.MSVCRT20.dll_free]
add esp, 4
push 0
call fcn.0040fe60
add esp, 4
call fcn.0040ee6c
inc dword [0x42b130]
jmp case.default.0x41127c
push 0x42b630
push 0x430810
push 0x22
call fcn.004093aa
add esp, 0xc
xor eax, eax
mov al, byte [0x42c0ec]
test eax, eax
jne 0x411149
mov al, byte [0x42cbf8]
mov byte [0x42c0ec], al
xor eax, eax
mov al, byte [0x42cc08]
test eax, eax
jne 0x411162
mov al, byte [0x42cbf8]
mov byte [0x42cc08], al
push 0
call fcn.0040fe60
add esp, 4
inc dword [0x42b130]
jmp case.default.0x41127c
push 0x42b630
push 0x431388
push 0x22
call fcn.004093aa
add esp, 0xc
mov byte [0x42c0ec], 0
mov byte [0x42cc08], 0
push 0
call fcn.0040fe60
add esp, 4
inc dword [0x42b130]
jmp case.default.0x41127c
xor eax, eax
mov al, byte [0x42c210]
test al, 1
jne 0x411215
push 0x42b630
push 0x430268
push 0x22
call fcn.004093aa
add esp, 0xc
xor eax, eax
mov al, byte [0x42c210]
or al, 1
mov byte [0x42c210], al
lea eax, [ebp - 0x10]
push eax
call fcn.004196e9
add esp, 4
push 0xb
lea eax, [ebp - 0x10]
push eax
call fcn.00423d5d
add esp, 8
mov byte [0x42c25c], al
mov dword [ebp - 0x14], 1
push 0
call fcn.0040fe60
add esp, 4
inc dword [0x42b130]
jmp case.default.0x41127c
xor eax, eax
mov al, byte [0x42c210]
test al, 1
je 0x411262
push 0x42b630
push 0x4312f0
push 0x22
call fcn.004093aa
add esp, 0xc
xor eax, eax
mov al, byte [0x42c210]
and al, 0xfe
mov byte [0x42c210], al
mov dword [ebp - 0x14], 2
push 0
call fcn.0040fe60
add esp, 4
inc dword [0x42b130]
jmp case.default.0x41127c
dec dword [ebp - 0x20]
cmp dword [ebp - 0x20], 7
ja case.default.0x41127c
mov eax, dword [ebp - 0x20]
jmp dword [eax*4 + 0x411283]
xor eax, eax
mov al, byte [0x42c210]
test al, 1
je 0x4112bc
mov dword [0x42b41c], 1
call fcn.004102f7
cmp dword [ebp - 0x14], 0
je 0x4112d9
mov al, byte [0x42c25c]
push eax
call fcn.00426b45
add esp, 4
push 0x6c00
call fcn.0041a3d0
add esp, 4
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.MSVCRT20.dll_ftell]
add esp, 4
mov dword [ebp - 8], eax
mov eax, 0x1000
mov ecx, dword [ebp - 8]
and ecx, 0xfff
sub eax, ecx
mov ecx, dword [0x42c0a8]
cmp eax, ecx
jb 0x411319
mov eax, ecx
mov dword [ebp - 4], eax
cmp dword [0x42c0a8], 0
jbe 0x4113f5
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp - 4]
push eax
push 1
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.MSVCRT20.dll_fread]
add esp, 0x10
cmp eax, dword [ebp - 4]
je 0x411356
push 0x42f988
call fcn.004081d7
add esp, 4
cmp dword [ebp - 0x14], 1
jne 0x411375
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call fcn.0041a490
add esp, 8
jmp 0x41138f
cmp dword [ebp - 0x14], 2
jne 0x41138f
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call fcn.0041a4ab
add esp, 8
cmp dword [0x42b148], 0
jne 0x4113cb
mov eax, dword [0x42b180]
push eax
mov eax, dword [ebp - 4]
push eax
push 1
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.MSVCRT20.dll_fwrite]
add esp, 0x10
cmp eax, dword [ebp - 4]
je 0x4113cb
push 0x42fa18
call fcn.004081d7
add esp, 4
xor eax, eax
sub eax, dword [ebp - 4]
neg eax
sub dword [0x42c0a8], eax
mov eax, dword [0x42c0a8]
cmp eax, 0x6c00
jb 0x4113ed
mov eax, 0x6c00
mov dword [ebp - 4], eax
jmp 0x41131c
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.MSVCRT20.dll_free]
add esp, 4
pop edi
pop esi
pop ebx
leave
ret