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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5141f0
mov eax, dword fs:[0]
push eax
sub esp, 0x138
mov eax, dword [0x58fa2c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
mov dword [ebp - 0x134], esi
mov dword [ebp - 0x144], esi
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x13c], ebx
mov dword [ebp - 0x140], ebx
mov dword [ebp - 0x120], 0
mov dword [ebp - 0x11c], 0
mov byte [ebp - 0x118], 0
lea eax, [esi + 0x24c]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 0
mov ecx, ebx
lea edx, [ebp - 0x118]
sub edx, ebx
mov al, byte [ecx]
mov byte [edx + ecx], al
lea ecx, [ecx + 1]
test al, al
jne 0x486177
lea edi, [ebp - 0x118]
dec edi
nop word [eax + eax]
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x486190
mov eax, dword [0x525008]
mov dword [edi], eax
lea eax, [ebp - 0x118]
push eax
call fcn.00485b90
add esp, 4
call fcn.00485b60
lea eax, [ebp - 0x118]
push eax
push ebx
call dword [0x591e24]
call fcn.00485b00
push 0
push 2
push 3
push 0
push 0
push bind
lea eax, [ebp - 0x118]
push eax
call dword [0x591e1c]
mov dword [ebp - 0x120], eax
cmp eax, 0xffffffff
je 0x48637a
call fcn.00485b00
push 0
push 2
push 2
push 0
push 0
push 0xc0000000
push ebx
call dword [0x591e1c]
mov esi, eax
mov dword [ebp - 0x11c], esi
cmp esi, 0xffffffff
je 0x486366
xor edi, edi
mov dword [ebp - 0x128], edi
mov dword [ebp - 0x12c], 1
mov dword [ebp - 0x124], 0x8000
push 2
push edi
mov eax, dword [ebp + 0xc]
neg eax
push eax
push dword [ebp - 0x120]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0x8001
call fcn.004a4577
add esp, 4
mov ebx, eax
nop
cmp dword [ebp - 0x124], 0x8000
jne 0x486329
push 0
lea eax, [ebp - 0x124]
push eax
push 0x8000
push ebx
push dword [ebp - 0x120]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x48629f
mov edi, 1
mov dword [ebp - 0x128], edi
jmp 0x486329
mov esi, dword [ebp - 0x124]
test esi, esi
je 0x486323
mov dword [ebp - 0x138], esi
mov eax, ebx
mov byte [ebx + esi], 0
cmp dword [ebp - 0x12c], edi
je 0x4862e4
push 0x568c2c
push ebx
call fcn.004b9010
add esp, 8
test eax, eax
je 0x486318
add eax, 2
mov ecx, ebx
sub ecx, eax
add esi, ecx
mov dword [ebp - 0x138], esi
mov dword [ebp - 0x12c], edi
mov dword [ebp - 0x130], edi
push 0
lea ecx, [ebp - 0x130]
push ecx
push esi
push eax
push dword [ebp - 0x11c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x486318
cmp esi, dword [ebp - 0x130]
jne 0x486318
mov esi, dword [ebp - 0x11c]
jmp 0x486260
mov edi, 1
mov dword [ebp - 0x128], edi
mov esi, dword [ebp - 0x11c]
push 1
push ebx
call fcn.004a42c5
add esp, 8
mov eax, dword [ebp - 0x134]
cmp dword [eax + 0x38], 0
je 0x486349
push esi
call fcn.00485e00
add esp, 4
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
test edi, edi
je 0x48636c
push dword [ebp - 0x13c]
call fcn.00485b90
add esp, 4
jmp 0x48636c
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x120]
call esi
mov esi, dword [ebp - 0x134]
lea eax, [ebp - 0x118]
push eax
call fcn.00485b90
add esp, 4
mov dword [ebp - 4], 0xffffffff
jmp 0x48640e
lea eax, [esi + 0x24c]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004a4566
mov esp, ebp
pop ebp
ret 8