Function at 0x486470
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x514228
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x58fa2c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
mov dword [ebp - 0x18], esi
cmp dword [esi + 0x34], 0
je 0x486729
mov dword [ebp - 4], 0
mov eax, dword [0x58f3dc]
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 1
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
lea eax, [ebp - 0x14]
push eax
call fcn.004856f0
test eax, eax
je 0x4866c5
cmp dword [esi + 8], 1
jne 0x4865df
cmp dword [esi + 0x18], 0
je 0x4865df
cmp dword [esi + 0xc], 0
je 0x4865df
lea eax, [esi + 0x264]
push eax
mov ebx, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call ebx
mov byte [ebp - 4], 2
push 0x568c2c
lea ecx, [ebp - 0x14]
call fcn.00488db0
mov eax, dword [ebp - 0x14]
mov eax, dword [eax - 8]
inc eax
push eax
call fcn.004a4577
add esp, 4
mov dword [ebp + 0x18], eax
mov edx, dword [ebp - 0x14]
mov cl, byte [edx]
mov byte [eax], cl
lea edx, [edx + 1]
lea eax, [eax + 1]
test cl, cl
jne 0x486531
lea eax, [ebp + 0x18]
push eax
lea ecx, [esi + 0x1c]
call fcn.00486c90
push dword [esi + 0x18]
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov dword [ebp - 4], 1
jmp 0x486573
lea eax, [esi + 0x264]
push eax
mov edi, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call edi
lea eax, [esi + 0x24c]
push eax
call ebx
mov byte [ebp - 4], 4
mov eax, dword [esi + 0x284]
test eax, eax
je 0x4865a6
push dword [ebp - 0x14]
push 0x51e620
call eax
add esp, 8
mov dword [ebp - 4], 1
lea eax, [esi + 0x24c]
push eax
call edi
jmp 0x4866c5
lea eax, [esi + 0x24c]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 4], 6
call fcn.00485b00
push 0
push 2
push 4
push 0
push 3
push 0xc0000000
lea eax, [esi + 0x148]
push eax
call dword [0x591e1c]
mov edi, eax
cmp edi, 0xffffffff
je 0x48668d
mov ecx, dword [ebp - 0x14]
mov ebx, dword [ecx - 8]
push 0x568c2c
lea ecx, [ebp - 0x14]
call fcn.00488db0
push 2
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp - 0x14]
push 0
lea ecx, [ebp + 0x18]
push ecx
push dword [eax - 8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 2
push ebx
lea ecx, [ebp - 0x14]
call fcn.00489010
cmp dword [esi + 0x38], 0
je 0x486666
push edi
call fcn.00485e00
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x284]
test eax, eax
je 0x48669f
push dword [ebp - 0x14]
push 0x51e620
call eax
add esp, 8
mov dword [ebp - 4], 1
jmp 0x4866b8
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x48669f
mov dword [esi + 0x3c], 1
mov dword [ebp - 4], 1
jmp 0x4866b8
lea eax, [esi + 0x24c]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x14]
call fcn.00488bc0
mov dword [ebp - 4], 0xffffffff
jmp 0x4866fb
mov dword [ebp - 4], 9
inc dword [esi + 0x280]
cmp dword [esi + 0x280], 0xa
jbe 0x486722
mov dword [esi + 0x280], 0
mov ecx, esi
call fcn.00485fe0
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14