Function at 0x4a23c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x64c874]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
mov edi, ecx
cmp dword [edi + 4], 0xffffffff
mov dword [ebp - 0x10], edi
jne 0x4a23fa
mov esi, 6
call fcn.005d95d0
mov ecx, dword [ebp + 0x18]
mov dword [ecx + 4], eax
or eax, 0xffffffff
mov dword [ecx], esi
or edx, eax
jmp 0x4a2673
call fcn.004a20e0
xor ebx, ebx
test byte [edi + 0x24], 4
jne 0x4a2494
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push ebx
lea edx, [ebp - 0x1c]
push edx
push ecx
push eax
mov dword [ebp - 0x1c], eax
mov eax, dword [edi + 4]
push eax
mov dword [ebp - 0x18], ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x4a244b
call fcn.005d95d0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0x18]
mov dword [ecx], eax
or eax, 0xffffffff
mov dword [ecx + 4], esi
or edx, eax
jmp 0x4a2673
mov esi, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x14]
lea eax, [esi + ecx*8]
cmp esi, eax
mov dword [ebp - 0xc], eax
jae 0x4a248d
jmp 0x4a2460
mov eax, dword [esi + 4]
mov ecx, dword [esi]
push 0
lea edx, [ebp - 0x10]
push edx
mov edx, dword [edi + 4]
push eax
push ecx
push edx
mov dword [ebp - 0x10], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4a242c
add ebx, dword [ebp - 0x10]
add esi, 8
cmp esi, dword [ebp - 0xc]
jb 0x4a2460
mov eax, ebx
jmp 0x4a2671
mov esi, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x14]
lea edi, [esi + ecx*8]
xor ebx, ebx
cmp esi, edi
mov eax, esi
mov dword [ebp - 0xc], edi
jae 0x4a24b2
add ebx, dword [eax + 4]
add eax, 8
cmp eax, edi
jb 0x4a24a8
mov ecx, dword [0x65a7f8]
lea eax, [ebx + ecx - 1]
cdq
idiv ecx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x14], eax
lea eax, [eax*8 + 8]
call fcn.005c1e30
cmp esi, edi
mov ecx, esp
mov dword [ebp - 0x18], ecx
jae 0x4a2501
xor edi, edi
cmp dword [esi + 4], edi
jle 0x4a24f9
mov eax, dword [esi]
add eax, edi
add edi, dword [0x65a7f8]
cdq
mov dword [ecx], eax
mov dword [ecx + 4], edx
add ecx, 8
cmp edi, dword [esi + 4]
jl 0x4a24e1
add esi, 8
cmp esi, dword [ebp - 0xc]
jb 0x4a24da
xor esi, esi
xor eax, eax
mov dword [ecx], esi
mov dword [ecx + 4], esi
push esi
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
mov edx, eax
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 8]
push 1
push esi
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x2c], esi
sar edx, 0x1f
mov dword [ebp - 0x28], eax
call dword [sym.imp.KERNEL32.dll_CreateEventW]
cmp eax, esi
mov dword [ebp - 0x20], eax
je 0x4a242c
mov ecx, dword [0x65a7f8]
lea edx, [ecx - 1]
xor edi, edi
test ebx, edx
mov dword [ebp - 0xc], ebx
je 0x4a256c
mov eax, ebx
cdq
mov esi, eax
add esi, dword [ebp + 8]
mov edi, edx
adc edi, dword [ebp + 0xc]
imul ecx, dword [ebp - 0x14]
mov dword [ebp - 0x34], ecx
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x18]
lea eax, [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x10]
push 0
push ecx
mov ecx, dword [eax + 4]
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFileGather]
test eax, eax
jne 0x4a264c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
mov dword [ebp - 0x18], eax
je 0x4a25ca
cmp eax, 0x22a
je 0x4a25ca
call fcn.005d95d0
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp - 0x18]
mov dword [ecx + 4], eax
mov eax, dword [ebp - 0x20]
push eax
mov dword [ecx], edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, 0xffffffff
or edx, eax
jmp 0x4a2673
mov ecx, dword [ebp - 0x20]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
jne 0x4a2601
call fcn.005d95d0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp - 0x20]
push edx
mov dword [ecx], eax
mov dword [ecx + 4], esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, 0xffffffff
or edx, eax
jmp 0x4a2673
mov edx, dword [ebp - 0x10]
push 0
lea eax, [ebp - 0x14]
push eax
mov eax, dword [edx + 4]
lea ecx, [ebp - 0x30]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x4a2642
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call fcn.005d95d0
mov ecx, dword [ebp + 0x18]
mov dword [ecx], esi
mov dword [ecx + 4], eax
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, 0xffffffff
or edx, eax
jmp 0x4a2673
mov eax, dword [ebp - 0x14]
cmp eax, ebx
jae 0x4a264c
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
jl 0x4a266e
jg 0x4a2660
test esi, esi
jbe 0x4a266e
mov eax, dword [ebp + 0x18]
mov ebx, dword [ebp - 0x10]
push eax
push edi
push esi
call fcn.004a2760
mov eax, dword [ebp - 0xc]
xor edx, edx
lea esp, [ebp - 0x44]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.005b88a9
mov esp, ebp
pop ebp
ret 0x14