Function at 0x4a22c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov dword [ebp - 0x28], ecx
mov eax, dword [ebp - 0x28]
mov dword [eax + 0x10], 0
cmp dword [ebp + 0x10], 0
jne 0x4a22df
lea ecx, [ebp - 0x20]
mov dword [ebp + 0x10], ecx
mov edx, dword [ebp + 0x10]
mov dword [edx], 0
mov eax, dword [ebp - 0x28]
cmp dword [eax + 4], 0
jne 0x4a2306
mov ecx, dword [ebp - 0x28]
mov dword [ecx + 0x10], 6
mov edx, dword [ebp - 0x28]
mov eax, dword [edx + 0x10]
jmp 0x4a2528
mov eax, dword [ebp - 0x28]
cmp dword [eax + 0x1c], 0
jne 0x4a2330
cmp dword [ebp + 0x14], 0
jne 0x4a231b
cmp dword [ebp + 0x18], 0xffffffff
je 0x4a2330
mov ecx, dword [ebp - 0x28]
mov dword [ecx + 0x10], 1
mov edx, dword [ebp - 0x28]
mov eax, dword [edx + 0x10]
jmp 0x4a2528
cmp dword [ebp + 0x14], 0
jne 0x4a235e
mov eax, dword [ebp - 0x28]
cmp dword [eax + 0x1c], 0
je 0x4a235e
push 0x14
push 0
lea ecx, [ebp - 0x1c]
push ecx
call fcn.006665c0
add esp, 0xc
mov edx, dword [ebp - 0x28]
mov eax, dword [edx + 0x1c]
mov dword [ebp - 0xc], eax
lea ecx, [ebp - 0x1c]
mov dword [ebp + 0x14], ecx
mov dword [ebp - 8], 0
mov byte [ebp - 1], 0
cmp dword [ebp + 0xc], 0
jbe 0x4a2522
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
add edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4a249e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0x3e5
je 0x4a23fc
movzx edx, byte [ebp - 1]
test edx, edx
jne 0x4a23e0
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x24]
mov dword [eax + 0x10], ecx
mov byte [ebp - 1], 1
mov edx, dword [ebp - 0x24]
push edx
push str.WriteFile_return_err:_ld__retry_r_n
call fcn.0066610b
add esp, 8
jmp 0x4a2369
mov eax, dword [ebp - 0x24]
push eax
push str.WriteFile_return_err:_ld__retry_FAIL__r_n
call fcn.0066610b
add esp, 8
mov ecx, dword [ebp - 0x28]
mov eax, dword [ecx + 0x10]
jmp 0x4a2528
mov edx, dword [ebp + 0x14]
lea eax, [ebp - 0x1c]
cmp edx, eax
jne 0x4a249c
mov ecx, dword [ebp + 0x18]
push ecx
mov edx, dword [ebp + 0x14]
mov eax, dword [edx + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
je 0x4a242f
cmp dword [ebp - 0x2c], 0x102
je 0x4a2463
jmp 0x4a2485
push 0
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x4a2461
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp - 0x28]
mov dword [edx + 0x10], eax
mov eax, dword [ebp - 0x28]
mov eax, dword [eax + 0x10]
jmp 0x4a2528
jmp 0x4a249c
mov ecx, dword [ebp - 0x28]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.KERNEL32.dll_CancelIo]
mov eax, dword [ebp - 0x28]
mov dword [eax + 0x10], 0x5b4
mov ecx, dword [ebp - 0x28]
mov eax, dword [ecx + 0x10]
jmp 0x4a2528
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp - 0x28]
mov dword [edx + 0x10], eax
mov eax, dword [ebp - 0x28]
mov eax, dword [eax + 0x10]
jmp 0x4a2528
jmp 0x4a24b1
cmp dword [ebp + 0x14], 0
je 0x4a24b1
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [ebp - 0x28]
cmp dword [eax + 0x10], 0
jne 0x4a251d
mov ecx, dword [ebp + 0x10]
cmp dword [ecx], 0
ja 0x4a24d3
mov edx, dword [0x7f70d0]
add edx, 1
mov dword [0x7f70d0], edx
jmp 0x4a24dd
mov dword [0x7f70d0], 0
cmp dword [0x7f70d0], 0xa
jle 0x4a2507
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x28]
mov dword [ecx + 0x10], eax
mov edx, dword [ebp - 0x28]
cmp dword [edx + 0x10], 0
jne 0x4a2505
mov eax, dword [ebp - 0x28]
mov dword [eax + 0x10], 0xff
jmp 0x4a2522
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
sub edx, dword [ecx]
mov dword [ebp + 0xc], edx
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 8]
add ecx, dword [eax]
mov dword [ebp - 8], ecx
jmp 0x4a2369
mov edx, dword [ebp - 0x28]
mov eax, dword [edx + 0x10]
mov esp, ebp
pop ebp
ret 0x14