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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff98
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0xc]
mov dword [ebp - 0x44], edx
mov ecx, dword [ebp - 0x44]
cmp ecx, 0x930
jle 0x4ba576
sub dword [ebp - 0x44], 0x60
mov eax, dword [ebp - 0x44]
add eax, 0xfffff6e0
mov dword [ebp - 0x48], eax
mov edx, dword [ebp + 8]
mov ecx, dword [edx]
cmp ecx, 3
jne 0x4ba5ba
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 - 0x40], eax
mov edx, dword [ebp - 0x40]
cmp edx, 0xffffffff
jne 0x4ba5c0
xor eax, eax
jmp 0x4ba9b9
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x40], 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 - 0x40]
call sub.KERNEL32.DLL_SetFilePointer
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
cmp ecx, 0xffffffff
jne 0x4ba613
call sub.KERNEL32.DLL_GetLastError
test eax, eax
je 0x4ba613
mov eax, dword [ebp + 8]
mov edx, dword [eax]
cmp edx, 3
jne 0x4ba60c
push dword [ebp - 0x40]
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
jmp 0x4ba9b9
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.0067499b
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp + 8]
mov eax, 0x12000
mov ecx, dword [edx + 0xc]
cdq
idiv ecx
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0xc]
imul edx, dword [ebp - 0x24]
mov dword [ebp - 0x2c], edx
imul ecx, dword [ebp - 0x24], 0x930
mov dword [ebp - 0x28], ecx
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0x238]
mov dword [ebp - 0x3c], edx
jmp 0x4ba98e
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x24]
cmp ecx, eax
jl 0x4ba804
push 0
lea edx, [ebp - 0x14]
push edx
push dword [ebp - 0x2c]
push 0x8565f8
push dword [ebp - 0x40]
call sub.KERNEL32.DLL_ReadFile
mov dword [ebp - 0x34], 0x8565f8
mov dword [ebp - 0x30], 0x8685f8
xor ecx, ecx
mov dword [ebp - 0x20], ecx
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x24]
cmp eax, edx
jge 0x4ba758
push 0xc
push 0x760da8
push dword [ebp - 0x30]
call fcn.0066cc18
add esp, 0xc
lea ecx, [ebp - 0x37]
push ecx
mov eax, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x20]
add eax, edx
push eax
call fcn.004ac3cc
add esp, 8
movsx ecx, byte [ebp - 0x37]
push ecx
call fcn.004ac358
pop ecx
mov edx, dword [ebp - 0x30]
mov byte [edx + 0xc], al
movsx eax, byte [ebp - 0x36]
push eax
call fcn.004ac358
pop ecx
mov ecx, dword [ebp - 0x30]
mov byte [ecx + 0xd], al
movsx eax, byte [ebp - 0x35]
push eax
call fcn.004ac358
pop ecx
mov edx, dword [ebp - 0x30]
mov byte [edx + 0xe], al
mov ecx, dword [ebp - 0x30]
mov byte [ecx + 0xf], 2
push 0x920
mov eax, dword [ebp - 0x34]
mov edx, dword [ebp - 0x48]
add eax, edx
push eax
mov ecx, dword [ebp - 0x30]
add ecx, 0x10
push ecx
call fcn.0066cc18
add esp, 0xc
add dword [ebp - 0x30], 0x930
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0xc]
add dword [ebp - 0x34], edx
inc dword [ebp - 0x20]
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x24]
cmp ecx, eax
jl 0x4ba6b9
push 0
lea edx, [ebp - 0x18]
push edx
push dword [ebp - 0x28]
push 0x8685f8
push dword [ebp + 0x10]
call sub.KERNEL32.DLL_WriteFile
mov eax, dword [ebp - 0x2c]
cdq
add dword [0x833f58], eax
adc dword [0x833f5c], edx
mov eax, dword [0x833f58]
mov edx, dword [0x833f5c]
mov dword [ebp - 0x50], eax
sub edx, 0x80000000
mov dword [ebp - 0x4c], edx
fild qword [ebp - 0x50]
fadd qword [0x4ba9c0]
mov eax, dword [0x833f50]
mov edx, dword [0x833f54]
mov dword [ebp - 0x58], eax
sub edx, 0x80000000
mov dword [ebp - 0x54], edx
fild qword [ebp - 0x58]
fadd qword [0x4ba9c0]
fdivp st(1)
add esp, 0xfffffff8
fstp qword [esp]
call fcn.00441458
add esp, 8
mov ecx, dword [0x6fb15c]
test ecx, ecx
je 0x4ba7f3
mov eax, dword [ebp + 8]
mov edx, dword [eax]
cmp edx, 3
jne 0x4ba7ec
push dword [ebp - 0x40]
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
jmp 0x4ba9b9
mov edx, dword [ebp - 0x24]
sub dword [ebp - 0x1c], edx
mov ecx, dword [ebp - 0x24]
add dword [ebp - 0x3c], ecx
jmp 0x4ba98e
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0xc]
imul edx, dword [ebp - 0x1c]
mov dword [ebp - 0x2c], edx
imul ecx, dword [ebp - 0x1c], 0x930
mov dword [ebp - 0x28], ecx
push 0
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x2c]
push 0x8565f8
push dword [ebp - 0x40]
call sub.KERNEL32.DLL_ReadFile
mov dword [ebp - 0x34], 0x8565f8
mov dword [ebp - 0x30], 0x8685f8
xor edx, edx
mov dword [ebp - 0x20], edx
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x1c]
cmp ecx, eax
jge 0x4ba8f1
push 0xc
push 0x760da8
push dword [ebp - 0x30]
call fcn.0066cc18
add esp, 0xc
lea edx, [ebp - 0x37]
push edx
mov ecx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x20]
add ecx, eax
push ecx
call fcn.004ac3cc
add esp, 8
movsx edx, byte [ebp - 0x37]
push edx
call fcn.004ac358
pop ecx
mov ecx, dword [ebp - 0x30]
mov byte [ecx + 0xc], al
movsx eax, byte [ebp - 0x36]
push eax
call fcn.004ac358
pop ecx
mov edx, dword [ebp - 0x30]
mov byte [edx + 0xd], al
movsx ecx, byte [ebp - 0x35]
push ecx
call fcn.004ac358
pop ecx
mov edx, dword [ebp - 0x30]
mov byte [edx + 0xe], al
mov eax, dword [ebp - 0x30]
mov byte [eax + 0xf], 2
push 0x920
mov ecx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x48]
add ecx, eax
push ecx
mov edx, dword [ebp - 0x30]
add edx, 0x10
push edx
call fcn.0066cc18
add esp, 0xc
add dword [ebp - 0x30], 0x930
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0xc]
add dword [ebp - 0x34], eax
inc dword [ebp - 0x20]
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x1c]
cmp edx, ecx
jl 0x4ba852
push 0
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x28]
push 0x8685f8
push dword [ebp + 0x10]
call sub.KERNEL32.DLL_WriteFile
mov eax, dword [ebp - 0x2c]
cdq
add dword [0x833f58], eax
adc dword [0x833f5c], edx
mov eax, dword [0x833f58]
mov edx, dword [0x833f5c]
mov dword [ebp - 0x60], eax
sub edx, 0x80000000
mov dword [ebp - 0x5c], edx
fild qword [ebp - 0x60]
fadd qword [0x4ba9c0]
mov eax, dword [0x833f50]
mov edx, dword [0x833f54]
mov dword [ebp - 0x68], eax
sub edx, 0x80000000
mov dword [ebp - 0x64], edx
fild qword [ebp - 0x68]
fadd qword [0x4ba9c0]
fdivp st(1)
add esp, 0xfffffff8
fstp qword [esp]
call fcn.00441458
add esp, 8
mov ecx, dword [0x6fb15c]
test ecx, ecx
je 0x4ba989
mov eax, dword [ebp + 8]
mov edx, dword [eax]
cmp edx, 3
jne 0x4ba985
push dword [ebp - 0x40]
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
jmp 0x4ba9b9
xor edx, edx
mov dword [ebp - 0x1c], edx
mov ecx, dword [ebp - 0x1c]
test ecx, ecx
jle 0x4ba9a2
mov eax, dword [0x6fb15c]
test eax, eax
je 0x4ba674
mov edx, dword [ebp + 8]
mov ecx, dword [edx]
cmp ecx, 3
jne 0x4ba9b4
push dword [ebp - 0x40]
call sub.KERNEL32.DLL_CloseHandle
mov eax, 1
mov esp, ebp
pop ebp
ret