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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa4
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0xc]
mov dword [ebp - 0x38], edx
mov ecx, dword [ebp - 0x38]
cmp ecx, 0x930
jle 0x4ba94f
sub dword [ebp - 0x38], 0x60
mov eax, dword [ebp - 0x38]
add eax, 0xfffff6e0
mov dword [ebp - 0x3c], eax
mov edx, dword [ebp + 8]
mov ecx, dword [edx]
cmp ecx, 3
jne 0x4ba993
push 0
push 0
push 3
push 0
push 3
push SysReAllocStringLen
mov eax, dword [ebp + 8]
add eax, 0x124
push eax
call sub.KERNEL32.DLL_CreateFileA
mov dword [ebp - 0x34], eax
mov edx, dword [ebp - 0x34]
cmp edx, 0xffffffff
jne 0x4ba999
xor eax, eax
jmp 0x4bacef
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x34], edx
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x228]
mov dword [ebp - 8], eax
mov eax, dword [ecx + 0x22c]
mov dword [ebp - 4], eax
push 0
lea edx, [ebp - 4]
push edx
push dword [ebp - 8]
push dword [ebp - 0x34]
call sub.KERNEL32.DLL_SetFilePointer
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
cmp ecx, 0xffffffff
jne 0x4ba9ec
call sub.KERNEL32.DLL_GetLastError
test eax, eax
je 0x4ba9ec
mov eax, dword [ebp + 8]
mov edx, dword [eax]
cmp edx, 3
jne 0x4ba9e5
push dword [ebp - 0x34]
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
jmp 0x4bacef
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xc]
cdq
push edx
push eax
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0xc]
dec eax
cdq
mov ecx, dword [ebp + 8]
add eax, dword [ecx + 0x230]
adc edx, dword [ecx + 0x234]
call fcn.0067457f
mov dword [ebp - 0x18], eax
mov edx, dword [ebp + 8]
mov eax, 0x12000
mov ecx, dword [edx + 0xc]
cdq
idiv ecx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0xc]
imul edx, dword [ebp - 0x20]
mov dword [ebp - 0x28], edx
imul ecx, dword [ebp - 0x20], 0x920
mov dword [ebp - 0x24], ecx
jmp 0x4bacc4
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x20]
cmp eax, edx
jl 0x4bab83
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0xc]
cmp eax, 0x920
jne 0x4baa74
push 0
lea edx, [ebp - 0x10]
push edx
push dword [ebp - 0x24]
push 0x85ac24
push dword [ebp - 0x34]
call sub.KERNEL32.DLL_ReadFile
jmp 0x4baadd
push 0
lea ecx, [ebp - 0x10]
push ecx
push dword [ebp - 0x28]
push 0x848c24
push dword [ebp - 0x34]
call sub.KERNEL32.DLL_ReadFile
mov dword [ebp - 0x30], 0x848c24
mov dword [ebp - 0x2c], 0x85ac24
xor eax, eax
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
cmp edx, ecx
jge 0x4baadd
push 0x920
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x3c]
add eax, edx
push eax
push dword [ebp - 0x2c]
call fcn.0066c7fc
add esp, 0xc
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0xc]
add dword [ebp - 0x30], eax
add dword [ebp - 0x2c], 0x920
inc dword [ebp - 0x1c]
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
cmp edx, ecx
jl 0x4baaa7
push 0
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x24]
push 0x85ac24
push dword [ebp + 0x10]
call sub.KERNEL32.DLL_WriteFile
mov eax, dword [ebp - 0x28]
cdq
add dword [0x826584], eax
adc dword [0x826588], edx
mov eax, dword [0x826584]
mov edx, dword [0x826588]
mov dword [ebp - 0x44], eax
sub edx, 0x80000000
mov dword [ebp - 0x40], edx
fild qword [ebp - 0x44]
fadd qword [0x4bacf5]
mov eax, dword [0x82657c]
mov edx, dword [0x826580]
mov dword [ebp - 0x4c], eax
sub edx, 0x80000000
mov dword [ebp - 0x48], edx
fild qword [ebp - 0x4c]
fadd qword [0x4bacf5]
fdivp st(1)
add esp, 0xfffffff8
fstp qword [esp]
call fcn.004412e0
add esp, 8
mov ecx, dword [0x6f6920]
test ecx, ecx
je 0x4bab78
mov eax, dword [ebp + 8]
mov edx, dword [eax]
cmp edx, 3
jne 0x4bab71
push dword [ebp - 0x34]
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
jmp 0x4bacef
mov edx, dword [ebp - 0x20]
sub dword [ebp - 0x18], edx
jmp 0x4bacc4
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0xc]
imul dword [ebp - 0x18]
mov dword [ebp - 0x28], eax
imul edx, dword [ebp - 0x18], 0x920
mov dword [ebp - 0x24], edx
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0xc]
cmp eax, 0x920
jne 0x4babbe
push 0
lea edx, [ebp - 0x10]
push edx
push dword [ebp - 0x24]
push 0x85ac24
push dword [ebp - 0x34]
call sub.KERNEL32.DLL_ReadFile
jmp 0x4bac27
push 0
lea ecx, [ebp - 0x10]
push ecx
push dword [ebp - 0x28]
push 0x848c24
push dword [ebp - 0x34]
call sub.KERNEL32.DLL_ReadFile
mov dword [ebp - 0x30], 0x848c24
mov dword [ebp - 0x2c], 0x85ac24
xor eax, eax
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
cmp edx, ecx
jge 0x4bac27
push 0x920
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x3c]
add eax, edx
push eax
push dword [ebp - 0x2c]
call fcn.0066c7fc
add esp, 0xc
add dword [ebp - 0x2c], 0x920
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0xc]
add dword [ebp - 0x30], eax
inc dword [ebp - 0x1c]
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
cmp edx, ecx
jl 0x4babf1
push 0
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x24]
push 0x85ac24
push dword [ebp + 0x10]
call sub.KERNEL32.DLL_WriteFile
mov eax, dword [ebp - 0x28]
cdq
add dword [0x826584], eax
adc dword [0x826588], edx
mov eax, dword [0x826584]
mov edx, dword [0x826588]
mov dword [ebp - 0x54], eax
sub edx, 0x80000000
mov dword [ebp - 0x50], edx
fild qword [ebp - 0x54]
fadd qword [0x4bacf5]
mov eax, dword [0x82657c]
mov edx, dword [0x826580]
mov dword [ebp - 0x5c], eax
sub edx, 0x80000000
mov dword [ebp - 0x58], edx
fild qword [ebp - 0x5c]
fadd qword [0x4bacf5]
fdivp st(1)
add esp, 0xfffffff8
fstp qword [esp]
call fcn.004412e0
add esp, 8
mov ecx, dword [0x6f6920]
test ecx, ecx
je 0x4bacbf
mov eax, dword [ebp + 8]
mov edx, dword [eax]
cmp edx, 3
jne 0x4bacbb
push dword [ebp - 0x34]
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
jmp 0x4bacef
xor edx, edx
mov dword [ebp - 0x18], edx
mov ecx, dword [ebp - 0x18]
test ecx, ecx
jle 0x4bacd8
mov eax, dword [0x6f6920]
test eax, eax
je 0x4baa41
mov edx, dword [ebp + 8]
mov ecx, dword [edx]
cmp ecx, 3
jne 0x4bacea
push dword [ebp - 0x34]
call sub.KERNEL32.DLL_CloseHandle
mov eax, 1
mov esp, ebp
pop ebp
ret