Function at 0x50de5c
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x7c
cmp dword [ecx + 4], 0xffffffff
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x3c], ecx
mov esi, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x18]
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], edx
jne 0x50de93
call fcn.004db479
mov dword [ebx], 6
mov dword [ebx + 4], eax
jmp 0x50e132
call fcn.0050d5ae
mov eax, dword [ebp - 0x3c]
test byte [eax + 0x20], 4
jne 0x50df47
mov eax, dword [ebp - 0x48]
mov edx, dword [ebp - 0x44]
mov dword [esp + 0x10], 0
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x30]
mov dword [ebp - 0x2c], edx
mov edx, dword [ebp - 0x44]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x48]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
sub esp, 0x14
test eax, eax
je 0x50e016
mov eax, dword [ebp + 0x14]
lea ecx, [ebp - 0x34]
xor edi, edi
lea eax, [esi + eax*8]
mov dword [ebp - 0x40], eax
cmp esi, dword [ebp - 0x40]
jae 0x50e170
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], 0
mov eax, dword [esi + 4]
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x34], 0
mov dword [esp + 8], eax
mov eax, dword [esi]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
sub esp, 0x14
test eax, eax
mov ecx, dword [ebp - 0x48]
je 0x50e016
add edi, dword [ebp - 0x34]
add esi, 8
jmp 0x50def6
mov eax, dword [ebp + 0x14]
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.00528054
mov dword [ebp - 0x40], eax
mov eax, dword [0x855c44]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x40]
mov edi, dword [ebp - 0x50]
lea eax, [eax + edi - 1]
cdq
idiv edi
lea ecx, [eax*8 + 8]
mov dword [ebp - 0x58], eax
lea eax, [ecx + 0x1e]
shr eax, 4
shl eax, 4
call fcn.005d34c0
sub esp, eax
lea eax, [esp + 0x23]
and eax, 0xfffffff0
mov dword [ebp - 0x54], eax
mov edi, dword [ebp - 0x54]
xor eax, eax
rep stosb byte es:[edi], al
mov eax, dword [ebp + 0x14]
lea ecx, [esi + eax*8]
mov eax, dword [ebp - 0x54]
cmp esi, ecx
jae 0x50dfc7
mov edi, dword [esi + 4]
xor edx, edx
mov dword [ebp - 0x5c], edi
cmp edx, dword [ebp - 0x5c]
jge 0x50dfc2
mov edi, dword [esi]
add eax, 8
add edi, edx
add edx, dword [ebp - 0x50]
mov dword [eax - 8], edi
jmp 0x50dfae
add esi, 8
jmp 0x50dfa2
lea edx, [ebp - 0x30]
mov dword [eax], 0
mov ecx, 5
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x44]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x28], eax
call dword [sym.imp.KERNEL32.dll_CreateEventW]
sub esp, 0x10
test eax, eax
mov dword [ebp - 0x20], eax
jne 0x50e02d
call fcn.004db479
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 4], esi
mov dword [ebx], eax
jmp 0x50e132
mov ecx, dword [0x855c44]
mov edi, dword [ebp - 0x40]
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
lea eax, [ecx - 1]
test edi, eax
je 0x50e061
mov eax, edi
cdq
add eax, dword [ebp - 0x48]
adc edx, dword [ebp - 0x44]
imul ecx, dword [ebp - 0x58]
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], edx
mov dword [ebp - 0x40], ecx
lea eax, [ebp - 0x30]
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x40]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x54]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WriteFileGather]
sub esp, 0x14
test eax, eax
jne 0x50e139
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0x3e5
je 0x50e0b6
mov dword [ebp - 0x3c], eax
call fcn.004db479
mov edx, dword [ebp - 0x3c]
mov dword [ebx], edx
jmp 0x50e116
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
inc eax
push ecx
push ecx
jne 0x50e0df
call fcn.004db479
mov edi, eax
call esi
mov dword [ebx + 4], edi
mov dword [ebx], eax
jmp 0x50e119
lea eax, [ebp - 0x34]
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
lea eax, [ebp - 0x30]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
sub esp, 0x10
test eax, eax
jne 0x50e128
call esi
mov esi, eax
call fcn.004db479
mov dword [ebx], esi
mov dword [ebx + 4], eax
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
jmp 0x50e132
mov eax, dword [ebp - 0x34]
cmp edi, eax
cmova edi, eax
jmp 0x50e139
or eax, 0xffffffff
mov edx, eax
jmp 0x50e174
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x4c], 0
push eax
jl 0x50e170
jg 0x50e154
cmp dword [ebp - 0x50], 0
jbe 0x50e170
mov eax, dword [ebp - 0x50]
mov edx, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x3c]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.0050dbde
sub esp, 0xc
mov eax, edi
xor edx, edx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 0x14