Function at 0x4bad50
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 0x4bad6e
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 0x4badb2
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 0x4badb8
xor eax, eax
jmp 0x4bb10e
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 0x4bae0b
call sub.KERNEL32.DLL_GetLastError
test eax, eax
je 0x4bae0b
mov eax, dword [ebp + 8]
mov edx, dword [eax]
cmp edx, 3
jne 0x4bae04
push dword [ebp - 0x34]
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
jmp 0x4bb10e
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 - 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 0x4bb0e3
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x20]
cmp eax, edx
jl 0x4bafa2
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0xc]
cmp eax, 0x920
jne 0x4bae93
push 0
lea edx, [ebp - 0x10]
push edx
push dword [ebp - 0x24]
push 0x8685f8
push dword [ebp - 0x34]
call sub.KERNEL32.DLL_ReadFile
jmp 0x4baefc
push 0
lea ecx, [ebp - 0x10]
push ecx
push dword [ebp - 0x28]
push 0x8565f8
push dword [ebp - 0x34]
call sub.KERNEL32.DLL_ReadFile
mov dword [ebp - 0x30], 0x8565f8
mov dword [ebp - 0x2c], 0x8685f8
xor eax, eax
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
cmp edx, ecx
jge 0x4baefc
push 0x920
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x3c]
add eax, edx
push eax
push dword [ebp - 0x2c]
call fcn.0066cc18
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 0x4baec6
push 0
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x24]
push 0x8685f8
push dword [ebp + 0x10]
call sub.KERNEL32.DLL_WriteFile
mov eax, dword [ebp - 0x28]
cdq
add dword [0x833f58], eax
adc dword [0x833f5c], edx
mov eax, dword [0x833f58]
mov edx, dword [0x833f5c]
mov dword [ebp - 0x44], eax
sub edx, 0x80000000
mov dword [ebp - 0x40], edx
fild qword [ebp - 0x44]
fadd qword [0x4bb114]
mov eax, dword [0x833f50]
mov edx, dword [0x833f54]
mov dword [ebp - 0x4c], eax
sub edx, 0x80000000
mov dword [ebp - 0x48], edx
fild qword [ebp - 0x4c]
fadd qword [0x4bb114]
fdivp st(1)
add esp, 0xfffffff8
fstp qword [esp]
call fcn.00441458
add esp, 8
mov ecx, dword [0x6fb15c]
test ecx, ecx
je 0x4baf97
mov eax, dword [ebp + 8]
mov edx, dword [eax]
cmp edx, 3
jne 0x4baf90
push dword [ebp - 0x34]
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
jmp 0x4bb10e
mov edx, dword [ebp - 0x20]
sub dword [ebp - 0x18], edx
jmp 0x4bb0e3
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 0x4bafdd
push 0
lea edx, [ebp - 0x10]
push edx
push dword [ebp - 0x24]
push 0x8685f8
push dword [ebp - 0x34]
call sub.KERNEL32.DLL_ReadFile
jmp 0x4bb046
push 0
lea ecx, [ebp - 0x10]
push ecx
push dword [ebp - 0x28]
push 0x8565f8
push dword [ebp - 0x34]
call sub.KERNEL32.DLL_ReadFile
mov dword [ebp - 0x30], 0x8565f8
mov dword [ebp - 0x2c], 0x8685f8
xor eax, eax
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
cmp edx, ecx
jge 0x4bb046
push 0x920
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x3c]
add eax, edx
push eax
push dword [ebp - 0x2c]
call fcn.0066cc18
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 0x4bb010
push 0
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x24]
push 0x8685f8
push dword [ebp + 0x10]
call sub.KERNEL32.DLL_WriteFile
mov eax, dword [ebp - 0x28]
cdq
add dword [0x833f58], eax
adc dword [0x833f5c], edx
mov eax, dword [0x833f58]
mov edx, dword [0x833f5c]
mov dword [ebp - 0x54], eax
sub edx, 0x80000000
mov dword [ebp - 0x50], edx
fild qword [ebp - 0x54]
fadd qword [0x4bb114]
mov eax, dword [0x833f50]
mov edx, dword [0x833f54]
mov dword [ebp - 0x5c], eax
sub edx, 0x80000000
mov dword [ebp - 0x58], edx
fild qword [ebp - 0x5c]
fadd qword [0x4bb114]
fdivp st(1)
add esp, 0xfffffff8
fstp qword [esp]
call fcn.00441458
add esp, 8
mov ecx, dword [0x6fb15c]
test ecx, ecx
je 0x4bb0de
mov eax, dword [ebp + 8]
mov edx, dword [eax]
cmp edx, 3
jne 0x4bb0da
push dword [ebp - 0x34]
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
jmp 0x4bb10e
xor edx, edx
mov dword [ebp - 0x18], edx
mov ecx, dword [ebp - 0x18]
test ecx, ecx
jle 0x4bb0f7
mov eax, dword [0x6fb15c]
test eax, eax
je 0x4bae60
mov edx, dword [ebp + 8]
mov ecx, dword [edx]
cmp ecx, 3
jne 0x4bb109
push dword [ebp - 0x34]
call sub.KERNEL32.DLL_CloseHandle
mov eax, 1
mov esp, ebp
pop ebp
ret