Function at 0x4c6ccf
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4240
call fcn.005fec20
mov eax, dword [0x708c34]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, ecx
xor ecx, ecx
inc ecx
cmp eax, 3
je 0x4c6d0f
cmp eax, 2
je 0x4c6d06
cmp eax, ecx
jne 0x4c6dac
cmp eax, 3
jne 0x4c6d90
mov esi, dword [ebp + 8]
cmp esi, dword [edi + 4]
je 0x4c6d54
cmp dword [edi + 4], 0xffffffff
je 0x4c6d25
push dword [edi]
call fcn.004c9498
pop ecx
mov eax, dword [edi]
or dword [edi + 4], 0xffffffff
cmp esi, dword [eax + 4]
jge 0x4c6dac
cmp esi, dword [eax + 0x10]
jge 0x4c6d43
push eax
call fcn.004c94fa
jmp 0x4c6d42
call fcn.004c9539
pop ecx
mov eax, dword [edi]
push eax
cmp dword [eax + 0x10], esi
jl 0x4c6d3d
call fcn.004c9598
pop ecx
mov dword [edi + 4], esi
push dword [ebp + 0x10]
push ebx
push dword [edi]
call fcn.004c97f4
mov esi, eax
add esp, 0xc
test esi, esi
jle 0x4c6d72
mov eax, 0x600
jmp 0x4c6fc9
push dword [edi]
call fcn.004c9498
or dword [edi + 4], 0xffffffff
pop ecx
test esi, esi
je 0x4c6e06
mov eax, 0x5000000
jmp 0x4c6fc9
cmp dword [edi + 4], 0xffffffff
je 0x4c6d9e
push dword [edi]
call fcn.004c9498
pop ecx
mov eax, dword [edi]
or dword [edi + 4], 0xffffffff
mov esi, dword [ebp + 8]
cmp esi, dword [eax + 4]
jl 0x4c6db6
mov eax, 0x10000
jmp 0x4c6fc9
cmp esi, dword [eax + 0x10]
jge 0x4c6dca
push eax
call fcn.004c94fa
jmp 0x4c6dc9
push eax
call fcn.004c9539
pop ecx
mov eax, dword [edi]
cmp dword [eax + 0x10], esi
jl 0x4c6dc3
lea eax, [ebp - 0x4234]
mov ecx, edi
push eax
push esi
call fcn.004c67ee
xor eax, eax
test byte [ebp - 0x412c], 0x10
je 0x4c6e0d
inc eax
cmp dword [ebp + 0x14], eax
je 0x4c6e06
lea eax, [ebp - 0x4230]
push eax
lea eax, [edi + 0x138]
push eax
call fcn.004c673c
pop ecx
pop ecx
xor eax, eax
jmp 0x4c6fc9
cmp dword [ebp + 0x14], 1
mov dword [ebp - 0x423c], eax
je 0x4c6f03
mov cl, byte [ebx]
mov esi, ebx
mov edx, ebx
test cl, cl
je 0x4c6eea
cmp cl, 0x2f
je 0x4c6e38
cmp cl, 0x5c
je 0x4c6e38
inc edx
jmp 0x4c6e3d
lea esi, [edx + 1]
mov edx, esi
mov cl, byte [edx]
test cl, cl
jne 0x4c6e2b
cmp esi, ebx
je 0x4c6eea
lea eax, [ebp - 0x108]
push ebx
push eax
call fcn.0063e750
sub esi, ebx
dec esi
pop ecx
pop ecx
cmp esi, 0x104
jae 0x4c6fda
xor eax, eax
mov byte [ebp + esi - 0x108], al
mov cl, byte [ebp - 0x108]
cmp cl, 0x2f
je 0x4c6e8b
cmp cl, 0x5c
je 0x4c6e8b
cmp byte [ebp - 0x107], 0x3a
jne 0x4c6e8e
xor eax, eax
inc eax
mov byte [ebp - 0x4235], al
lea eax, [ebp - 0x108]
push 0x69dc40
push eax
call fcn.00631ad4
mov esi, eax
lea eax, [ebp - 0x108]
push 0x69dc44
push eax
call fcn.00631ad4
movzx ecx, byte [ebp - 0x4235]
add esp, 0x10
test eax, eax
setne dl
test esi, esi
push 1
pop eax
cmovne ecx, eax
or dl, cl
jne 0x4c6ee8
lea eax, [ebp - 0x108]
push eax
lea eax, [edi + 0x138]
push eax
call fcn.004c673c
pop ecx
pop ecx
xor eax, eax
push eax
push dword [ebp - 0x412c]
push 2
push eax
push eax
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4c6f12
mov eax, 0x200
jmp 0x4c6fc9
push dword [edi]
call fcn.004c9598
mov esi, 0x4000
lea eax, [ebp - 0x4108]
push esi
push eax
push dword [edi]
call fcn.004c97f4
add esp, 0x10
jmp 0x4c6f62
je 0x4c6f6f
push 0
lea ecx, [ebp - 0x4240]
push ecx
push eax
lea eax, [ebp - 0x4108]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4c6f66
push esi
lea eax, [ebp - 0x4108]
push eax
push dword [edi]
call fcn.004c97f4
add esp, 0xc
test eax, eax
jns 0x4c6f32
xor eax, eax
inc eax
mov byte [ebp - 0x423c], al
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileType]
xor ecx, ecx
inc ecx
cmp eax, ecx
jne 0x4c6fa2
cmp byte [ebp - 0x423c], 0
jne 0x4c6fa2
lea eax, [ebp - 0x4118]
push eax
lea eax, [ebp - 0x4128]
push eax
lea eax, [ebp - 0x4120]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
xor eax, eax
inc eax
cmp dword [ebp + 0x14], eax
je 0x4c6fb1
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [edi]
call fcn.004c9498
xor eax, eax
cmp byte [ebp - 0x423c], al
pop ecx
mov ecx, 0x400
cmovne eax, ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005fe955
leave
ret 0x10
call fcn.005fe87a
int3