Function at 0x485070
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x1c]
sub esp, 8
xorps xmm0, xmm0
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0xc]
mov dword [edi + 4], 3
mov dword [edi + 0x20], 0
mov dword [edi + 0x44], esi
mov dword [edi + 0x40], 0
mov dword [edi + 0x3c], eax
mov dword [edi + 0x48], 0
mov dword [edi + 0x54], 0
mov dword [edi + 0x58], 0xffffffff
movups xmmword [edi + 0x20], xmm0
mov dword [edi + 0x30], 0
test dword [esi + 0x2c], 0x180000
je 0x4850e8
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [edi + 0x54], eax
test eax, eax
je 0x485332
or eax, 1
mov dword [edi + 0x30], eax
mov ebx, dword [0x4eadbc]
mov eax, dword [ebp + 0x18]
mov ecx, dword [0x4eadc0]
mov dword [edi + 0x4c], ebx
mov dword [edi + 0x50], ecx
test eax, eax
je 0x48513c
cmp eax, 1
jne 0x485116
cmp dword [ebp + 0x20], 0
jne 0x485116
mov eax, dword [ebp + 0x14]
mov ebx, dword [eax]
mov ecx, dword [eax + 4]
jmp 0x48513c
lea ecx, [ebp - 8]
push ecx
lea ecx, [ebp + 0xc]
push ecx
push eax
push dword [ebp + 0x14]
push edi
call fcn.00484b00
add esp, 0x14
test eax, eax
jne 0x48532b
mov edi, dword [ebp + 0xc]
mov ecx, dword [ebp - 4]
mov ebx, dword [ebp - 8]
mov edx, dword [esi + 0x2c]
mov eax, edx
and eax, 0x1100000
cmp eax, 0x1100000
jne 0x4851ca
push 0
lea eax, [ebp + 0xc]
push eax
push ebx
push ecx
push dword [esi + 0x94]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x485172
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [edi + 0x34], 0
mov ecx, dword [esi + 0x40]
lea eax, [ecx + 1]
mov dword [esi + 0x40], eax
test ecx, ecx
jne 0x48519d
mov eax, dword [esi + 0x2c]
test al, 4
jne 0x48519d
or eax, 4
mov dword [esi + 0x2c], eax
test al, 8
je 0x48519d
mov eax, dword [esi + 4]
inc dword [eax + 4]
mov ecx, dword [ebp + 8]
lea eax, [edi + 0x20]
push eax
push 0
push 0
inc dword [ecx + 0x10]
inc dword [esi + 0x3c]
inc dword [esi + 0x88]
push dword [ecx + 0x1c]
call dword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
test eax, eax
je 0x485343
jmp 0x485329
test edx, 0x1000000
je 0x485220
mov dword [edi + 0x4c], ebx
mov dword [edi + 0x50], ecx
mov dword [edi + 0x38], 0
mov eax, dword [esi + 0x11c]
test eax, eax
je 0x4851fa
mov eax, dword [eax + 0x38]
mov dword [edi + 0x38], eax
mov eax, dword [esi + 0x11c]
mov dword [eax + 0x38], edi
jmp 0x4851fd
mov dword [edi + 0x38], edi
mov dword [esi + 0x11c], edi
cmp dword [esi + 0x88], 0
jne 0x485215
push esi
call fcn.00486ae0
add esp, 4
mov dword [edi + 0x34], ebx
add dword [esi + 0x30], ebx
jmp 0x4852f6
lea eax, [edi + 0x20]
push eax
mov eax, dword [esi + 0x94]
push 0
push ebx
push ecx
push eax
test edx, 0x100000
je 0x48529e
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x485285
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x485263
mov dword [edi + 0x34], ebx
add dword [esi + 0x30], ebx
push 0xffffffffffffffff
push dword [edi + 0x54]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x48528c
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
push dword [edi + 0x54]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 0x54], 0
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [edi + 0x34], 0
push dword [edi + 0x54]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 0x54], 0
jmp 0x4852f6
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4852cb
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x4852c3
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [edi + 0x34], ebx
add dword [esi + 0x30], ebx
jmp 0x4852d2
mov dword [edi + 0x34], 0
test dword [esi + 0x2c], 0x80000
je 0x4852f6
push 4
push 0xffffffffffffffff
push edi
push 0x484ac0
push dword [edi + 0x54]
lea eax, [edi + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_RegisterWaitForSingleObject]
test eax, eax
je 0x4852b5
mov ecx, dword [esi + 0x40]
lea eax, [ecx + 1]
mov dword [esi + 0x40], eax
test ecx, ecx
jne 0x48531a
mov eax, dword [esi + 0x2c]
test al, 4
jne 0x48531a
or eax, 4
mov dword [esi + 0x2c], eax
test al, 8
je 0x48531a
mov eax, dword [esi + 4]
inc dword [eax + 4]
mov eax, dword [ebp + 8]
inc dword [eax + 0x10]
inc dword [esi + 0x3c]
inc dword [esi + 0x88]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.CreateEvent
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0048dbc0
push 0x4eaddc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0048dbc0
int3