Function at 0x4dc138
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
push ebx
push esi
push edi
mov edi, ecx
call fcn.004dca9f
push dword [ebp + 0x1c]
lea ecx, [ebp - 0x78]
mov dword [ebp - 4], eax
mov dword [ebp - 8], edx
xor ebx, ebx
call fcn.004dad8d
mov esi, dword [ebp + 0x14]
mov ecx, 0x10000
cmp esi, ecx
mov eax, ecx
push esi
push dword [ebp + 0x18]
cmovb eax, esi
lea ecx, [ebp - 0x78]
mov dword [ebp - 0x10], eax
call fcn.004dadbc
mov eax, dword [ebp + 8]
mov edx, esi
mov ecx, dword [ebp - 4]
add edx, eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0xc]
push ebx
pop esi
adc esi, eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 8]
add ecx, 0x10000
mov dword [ebp - 0x1c], edx
adc eax, ebx
mov dword [ebp - 0x20], esi
cmp esi, eax
jb 0x4dc22a
ja 0x4dc1af
cmp edx, ecx
jbe 0x4dc22a
cmp dword [ebp - 0x74], ebx
je 0x4dc209
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
sub eax, dword [ebp - 0x68]
sbb edx, dword [ebp - 0x64]
mov dword [ebp - 0x24], edx
jne 0x4dc1cc
cmp eax, 0xfa
jb 0x4dc202
mov eax, dword [ebp - 0x78]
lea ecx, [ebp - 0x78]
call dword [eax + 0x10]
mov ecx, dword [ebp - 0x74]
lea edx, [ebp - 0x60]
call fcn.004e0ebf
test eax, eax
jne 0x4dc1eb
mov esi, 0x80004004
jmp 0x4dc204
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x64], edx
mov dword [0x6ce828], eax
mov dword [0x6ce82c], edx
xor esi, esi
mov edx, dword [ebp - 0x1c]
jmp 0x4dc20b
xor esi, esi
test esi, esi
js 0x4dc377
push dword [ebp + 0x1c]
lea eax, [edi + 8]
push dword [ebp - 0x20]
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x18]
xor ebx, ebx
test eax, eax
setns bl
mov edx, dword [ebp + 8]
and dword [ebp - 0x2c], 0
cmp dword [ebp - 0x74], 0
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x30], eax
je 0x4dc28e
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
sub eax, dword [ebp - 0x68]
sbb edx, dword [ebp - 0x64]
mov dword [ebp + 0xc], edx
jne 0x4dc258
cmp eax, 0xfa
jb 0x4dc28e
mov eax, dword [ebp - 0x78]
lea ecx, [ebp - 0x78]
call dword [eax + 0x10]
mov ecx, dword [ebp - 0x74]
lea edx, [ebp - 0x60]
call fcn.004e0ebf
test eax, eax
jne 0x4dc277
mov esi, 0x80004004
jmp 0x4dc290
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x64], edx
mov dword [0x6ce828], eax
mov dword [0x6ce82c], edx
xor esi, esi
test esi, esi
js 0x4dc360
mov esi, dword [ebp - 0x10]
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x14]
push eax
push esi
push dword [ebp + 0x10]
push dword [edi + 0x20]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [edi + 0x28], 0
je 0x4dc2e0
test eax, eax
jne 0x4dc2ff
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x4dc2e4
push 1
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x3c]
push eax
push dword [edi + 0x20]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
neg eax
sbb eax, eax
neg eax
test eax, eax
jne 0x4dc2ff
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
jne 0x4dc360
mov esi, dword [ebp - 0x10]
mov ecx, dword [ebp + 0x18]
mov eax, dword [ebp - 0x14]
sub dword [ebp + 0x14], eax
mov edx, dword [ebp - 0x18]
add dword [ecx], eax
add dword [ebp + 0x10], eax
add edx, eax
mov ecx, dword [ebp - 0xc]
adc ecx, 0
mov dword [ebp - 0x18], edx
cmp dword [ebp - 8], ecx
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp + 0x14]
ja 0x4dc339
jb 0x4dc32d
cmp dword [ebp - 4], edx
ja 0x4dc339
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 4], edx
cmp esi, eax
jne 0x4dc35b
xor esi, esi
test ecx, ecx
je 0x4dc357
mov esi, 0x10000
cmp ecx, esi
mov eax, esi
cmovb eax, ecx
mov dword [ebp - 0x10], eax
jmp 0x4dc22d
xor ebx, ebx
jmp 0x4dc360
mov esi, 0x80004005
test ebx, ebx
je 0x4dc377
push 0
push dword [ebp - 8]
lea eax, [edi + 8]
push dword [ebp - 4]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x18]
jmp 0x4dc383
mov eax, dword [ebp - 4]
mov dword [edi + 0x50], eax
mov eax, dword [ebp - 8]
mov dword [edi + 0x54], eax
lea ecx, [ebp - 0x78]
call fcn.004dad2b
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18