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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff30
xor ecx, ecx
mov dword [ebp - 0xcc], ecx
mov dword [ebp - 0xd0], ecx
mov dword [ebp - 0xc4], ecx
mov dword [ebp - 0xc8], ecx
mov dword [ebp - 0xc0], ecx
mov dword [ebp - 0xb8], ecx
mov dword [ebp - 0xbc], ecx
mov dword [ebp - 0xb0], ecx
mov dword [ebp - 0xb4], ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00403a94
mov eax, dword [ebp - 8]
call fcn.00403a94
xor eax, eax
push ebp
push 0x410ebf
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 9], 0
mov eax, dword [ebp - 4]
call fcn.004038a4
test eax, eax
je 0x410e86
mov eax, dword [ebp - 8]
call fcn.004038a4
test eax, eax
je 0x410e86
push 0
lea eax, [ebp - 0xac]
push eax
mov eax, dword [ebp - 4]
call fcn.00403aa4
push eax
call sub.KERNEL32.DLL_OpenFile
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x410aec
push 0x410ed8
push dword [ebp - 4]
push 0x410ee8
lea edx, [ebp - 0xb4]
xor eax, eax
call fcn.0040666c
push dword [ebp - 0xb4]
lea eax, [ebp - 0xb0]
mov edx, 4
call fcn.00403964
mov eax, dword [ebp - 0xb0]
call fcn.00412fc4
jmp 0x410e86
push 0
mov eax, dword [ebp - 0x10]
push eax
call sub.KERNEL32.DLL_GetFileSize
add eax, 5
jae 0x410b01
call fcn.00402f1c
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
push eax
lea eax, [ebp - 0x1c]
mov ecx, 1
mov edx, dword [0x4109e0]
call fcn.00404268
add esp, 4
xor eax, eax
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x410b2c
cmp eax, dword [edx - 4]
jb 0x410b31
call fcn.00402f14
lea eax, [edx + eax]
mov edx, 0x4141e4
mov ecx, 5
call fcn.004049a4
push 0
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x14]
sub eax, 5
jae 0x410b56
call fcn.00402f1c
push eax
mov eax, 5
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x410b68
cmp eax, dword [edx - 4]
jb 0x410b6d
call fcn.00402f14
lea eax, [edx + eax]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.KERNEL32.DLL_ReadFile
test eax, eax
jne 0x410bbe
push 0x410ef4
push dword [ebp - 4]
push 0x410ee8
lea edx, [ebp - 0xbc]
xor eax, eax
call fcn.0040666c
push dword [ebp - 0xbc]
lea eax, [ebp - 0xb8]
mov edx, 4
call fcn.00403964
mov eax, dword [ebp - 0xb8]
call fcn.00412fc4
jmp 0x410e86
mov eax, dword [ebp - 0x10]
push eax
call sub.KERNEL32.DLL_CloseHandle
cmp dword [ebp - 0x14], 0xa
jbe 0x410cae
mov eax, 5
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x410be2
cmp eax, dword [edx - 4]
jb 0x410be7
call fcn.00402f14
mov al, byte [edx + eax]
cmp al, byte [0x4141e4]
jne 0x410cae
mov eax, 6
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x410c07
cmp eax, dword [edx - 4]
jb 0x410c0c
call fcn.00402f14
mov al, byte [edx + eax]
cmp al, byte [0x4141e5]
jne 0x410cae
mov eax, 7
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x410c2c
cmp eax, dword [edx - 4]
jb 0x410c31
call fcn.00402f14
mov al, byte [edx + eax]
cmp al, byte [0x4141e6]
jne 0x410cae
mov eax, 8
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x410c4d
cmp eax, dword [edx - 4]
jb 0x410c52
call fcn.00402f14
mov al, byte [edx + eax]
cmp al, byte [0x4141e7]
jne 0x410cae
mov eax, 9
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x410c6e
cmp eax, dword [edx - 4]
jb 0x410c73
call fcn.00402f14
mov al, byte [edx + eax]
cmp al, byte [0x4141e8]
jne 0x410cae
push 0x410f08
push dword [ebp - 4]
push 0x410f18
push dword [ebp - 8]
lea eax, [ebp - 0xc0]
mov edx, 4
call fcn.00403964
mov eax, dword [ebp - 0xc0]
call fcn.00412fc4
jmp 0x410e86
mov eax, dword [ebp - 0x14]
sub eax, 1
jae 0x410cbb
call fcn.00402f1c
sub eax, 5
jb 0x410d93
inc eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x18], 5
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x410cde
cmp eax, dword [edx - 4]
jb 0x410ce3
call fcn.00402f14
xor byte [edx + eax], 0xc2
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x410cf6
cmp eax, dword [edx - 4]
jb 0x410cfb
call fcn.00402f14
movzx eax, byte [edx + eax]
add eax, 0x79
jno 0x410d09
call fcn.00402f1c
add eax, 0x8000
cmp eax, 0xffff
jbe 0x410d1a
call fcn.00402f14
add eax, 0xffff8000
mov word [ebp - 0x1e], ax
cmp word [ebp - 0x1e], 0xff
jle 0x410d5f
movsx eax, word [ebp - 0x1e]
sub eax, 0xff
jno 0x410d3b
call fcn.00402f1c
sub eax, 1
jno 0x410d45
call fcn.00402f1c
add eax, 0x8000
cmp eax, 0xffff
jbe 0x410d56
call fcn.00402f14
add eax, 0xffff8000
mov word [ebp - 0x1e], ax
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x410d6e
cmp eax, dword [edx - 4]
jb 0x410d73
call fcn.00402f14
movsx ecx, word [ebp - 0x1e]
cmp ecx, 0xff
jbe 0x410d84
call fcn.00402f14
mov byte [edx + eax], cl
inc dword [ebp - 0x18]
dec dword [ebp - 0x24]
jne 0x410ccf
mov eax, dword [ebp - 8]
call fcn.004038a4
test eax, eax
jne 0x410daa
lea eax, [ebp - 8]
mov edx, dword [ebp - 4]
call fcn.004037c4
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
mov eax, dword [ebp - 8]
call fcn.00403aa4
push eax
call sub.KERNEL32.DLL_CreateFileA
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x410e0e
push 0x410f28
push dword [ebp - 8]
push 0x410ee8
lea edx, [ebp - 0xc8]
xor eax, eax
call fcn.0040666c
push dword [ebp - 0xc8]
lea eax, [ebp - 0xc4]
mov edx, 4
call fcn.00403964
mov eax, dword [ebp - 0xc4]
call fcn.00412fc4
push 0
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x14]
push eax
xor eax, eax
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x410e26
cmp eax, dword [edx - 4]
jb 0x410e2b
call fcn.00402f14
lea eax, [edx + eax]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.KERNEL32.DLL_WriteFile
test eax, eax
je 0x410e42
mov byte [ebp - 9], 1
jmp 0x410e7d
push 0x410f3c
push dword [ebp - 8]
push 0x410ee8
lea edx, [ebp - 0xd0]
xor eax, eax
call fcn.0040666c
push dword [ebp - 0xd0]
lea eax, [ebp - 0xcc]
mov edx, 4
call fcn.00403964
mov eax, dword [ebp - 0xcc]
call fcn.00412fc4
mov eax, dword [ebp - 0x10]
push eax
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x410ec6
lea eax, [ebp - 0xd0]
mov edx, 9
call fcn.00403750
lea eax, [ebp - 0x1c]
mov edx, dword [0x4109e0]
call fcn.00404274
lea eax, [ebp - 8]
mov edx, 2
call fcn.00403750
ret