Function at 0x4c672d
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x70
push ebx
push esi
push edi
mov edi, ecx
call fcn.004c657b
push dword [ebp + 0x1c]
and dword [ebp - 0xc], 0
lea ecx, [ebp - 0x70]
mov dword [ebp - 4], eax
mov dword [ebp - 8], edx
call fcn.004c513c
mov ebx, dword [ebp + 0x14]
lea ecx, [ebp - 0x70]
mov eax, 0x10000
cmp ebx, eax
mov esi, eax
mov eax, dword [ebp + 0x18]
cmovb esi, ebx
mov dword [ebp - 0x50], eax
and dword [ebp - 0x40], 0
push 0
push ebx
mov dword [ebp + 0x14], esi
call fcn.004c6c1e
mov ecx, dword [ebp + 8]
mov esi, ebx
mov edx, dword [ebp + 0xc]
add esi, ecx
push 0
pop eax
adc eax, edx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 4]
add eax, 0x10000
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 8]
adc eax, 0
mov dword [ebp - 0x1c], edx
cmp dword [ebp - 0x10], eax
jb 0x4c67ef
ja 0x4c67b1
cmp esi, dword [ebp - 0x20]
jbe 0x4c67ef
cmp dword [ebp - 0x6c], 0
je 0x4c67c3
lea ecx, [ebp - 0x70]
call fcn.004cab68
mov esi, eax
jmp 0x4c67c5
xor esi, esi
test esi, esi
js 0x4c68ec
push dword [ebp + 0x1c]
lea eax, [edi + 8]
push dword [ebp - 0x10]
mov ecx, dword [eax]
push dword [ebp - 0x24]
push eax
call dword [ecx + 0x18]
mov edx, dword [ebp + 0xc]
xor ecx, ecx
test eax, eax
setns cl
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp + 8]
and dword [ebp - 0x28], 0
cmp dword [ebp - 0x6c], 0
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], edx
je 0x4c680b
lea ecx, [ebp - 0x70]
call fcn.004cab68
mov esi, eax
jmp 0x4c680d
xor esi, esi
test esi, esi
js 0x4c68d2
mov esi, dword [ebp + 0x14]
lea eax, [ebp - 0x38]
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 0x4c685c
test eax, eax
jne 0x4c687b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x4c6860
push 1
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x38]
push eax
push dword [edi + 0x20]
call fcn.004cb33d
add esp, 0x10
movzx eax, al
test eax, eax
jne 0x4c687b
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
jne 0x4c68d2
mov esi, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x18]
mov eax, dword [ebp - 0x14]
sub ebx, eax
add dword [ebp + 0x10], eax
mov edx, dword [ebp - 0x1c]
add dword [ecx], eax
mov ecx, dword [ebp - 0x18]
add ecx, eax
mov dword [ebp - 0x18], ecx
adc edx, 0
mov dword [ebp - 0x1c], edx
cmp dword [ebp - 8], edx
ja 0x4c68ab
jb 0x4c68a5
cmp dword [ebp - 4], ecx
ja 0x4c68ab
mov dword [ebp - 4], ecx
mov dword [ebp - 8], edx
cmp esi, eax
jne 0x4c68cd
xor esi, esi
test ebx, ebx
je 0x4c68c9
mov esi, 0x10000
cmp ebx, esi
mov eax, esi
cmovb eax, ebx
mov dword [ebp + 0x14], eax
jmp 0x4c67ef
xor eax, eax
jmp 0x4c68d5
mov esi, 0x80004005
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x4c68ec
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 0x4c68f8
mov eax, dword [ebp - 4]
mov dword [edi + 0x50], eax
mov eax, dword [ebp - 8]
mov dword [edi + 0x54], eax
lea ecx, [ebp - 0x70]
call fcn.004c5234
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18