Function at 0x487230
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4cbfed
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x5a205c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x30], ebx
mov eax, dword [ebx + 0x1fe8]
mov dword [ebp - 0x50], eax
mov eax, dword [ebx + 0x1fec]
push 0xffffffffffffffff
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x50]
push 0
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
jne 0x48743a
lea ecx, [ebx + 0x1fb8]
lea esi, [ebx + 0x1fd0]
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x48], esi
nop dword [eax]
xor eax, eax
xor ebx, ebx
xor edi, edi
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x34], eax
push ecx
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor eax, eax
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x3c]
cmp eax, esi
je 0x4872ef
mov ebx, dword [esi]
mov eax, dword [esi + 8]
mov dword [esi], edi
mov edi, dword [esi + 4]
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], edi
mov dword [esi + 4], 0
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x34], eax
mov dword [esi + 8], 0
mov dword [ebp - 0x2c], edi
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, ebx
cmp esi, edi
je 0x4873ab
push ecx
mov edx, esi
mov dword [ebp - 0x2c], 0
lea ecx, [ebp - 0x28]
call fcn.0048a150
mov eax, dword [ebp - 0x30]
add esp, 4
push 2
push 0
push 0
push dword [eax + 0x1ff4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x2c]
push 0
push eax
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x28]
cmovae ecx, dword [ebp - 0x28]
add eax, eax
push eax
mov eax, dword [ebp - 0x30]
push ecx
push dword [eax + 0x1ff4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x30]
push dword [eax + 0x1ff4]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x48739c
mov eax, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov ecx, eax
cmp edx, 0x1000
jb 0x487392
mov eax, dword [eax - 4]
add edx, 0x23
sub ecx, eax
add ecx, 0xfffffffc
cmp ecx, 0x1f
ja 0x487458
push edx
push eax
call fcn.00495c64
add esp, 8
add esi, 0x18
cmp esi, edi
jne 0x487302
mov eax, edi
jmp 0x4873ae
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 4], 0xffffffff
test ebx, ebx
je 0x48741b
push ecx
mov edx, eax
mov ecx, ebx
call fcn.0048abc0
mov ecx, dword [ebp - 0x40]
mov eax, 0x2aaaaaab
sub ecx, ebx
add esp, 4
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax + eax*2]
mov eax, ebx
shl ecx, 3
cmp ecx, 0x1000
jb 0x4873fc
mov ebx, dword [ebx - 4]
add ecx, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x487458
push ecx
push ebx
call fcn.00495c64
add esp, 8
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x50]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
jne 0x48743a
mov esi, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x44]
jmp 0x4872a0
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004959d0
mov esp, ebp
pop ebp
ret
call fcn.0049ed71
int3