Function at 0x4c6670
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4588
call fcn.004f52d0
mov eax, dword [0x559940]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x4548], ecx
cmp dword [ebp + 0x14], 3
je 0x4c66a9
cmp dword [ebp + 0x14], 2
je 0x4c66a9
cmp dword [ebp + 0x14], 1
je 0x4c66a9
mov eax, 0x10000
jmp 0x4c6c52
cmp dword [ebp + 0x14], 3
jne 0x4c67d6
mov eax, dword [ebp - 0x4548]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 4]
je 0x4c676a
mov edx, dword [ebp - 0x4548]
cmp dword [edx + 4], 0xffffffff
je 0x4c66e2
mov eax, dword [ebp - 0x4548]
mov ecx, dword [eax]
push ecx
call fcn.004cb910
add esp, 4
mov edx, dword [ebp - 0x4548]
mov dword [edx + 4], 0xffffffff
mov eax, dword [ebp - 0x4548]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx + 4]
jl 0x4c6709
mov eax, 0x10000
jmp 0x4c6c52
mov eax, dword [ebp - 0x4548]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx + 0x10]
jge 0x4c672a
mov eax, dword [ebp - 0x4548]
mov ecx, dword [eax]
push ecx
call fcn.004cba10
add esp, 4
mov edx, dword [ebp - 0x4548]
mov eax, dword [edx]
mov ecx, dword [eax + 0x10]
cmp ecx, dword [ebp + 8]
jge 0x4c674d
mov edx, dword [ebp - 0x4548]
mov eax, dword [edx]
push eax
call fcn.004cba90
add esp, 4
jmp 0x4c672a
mov ecx, dword [ebp - 0x4548]
mov edx, dword [ecx]
push edx
call fcn.004cbb60
add esp, 4
mov eax, dword [ebp - 0x4548]
mov ecx, dword [ebp + 8]
mov dword [eax + 4], ecx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x4548]
mov edx, dword [ecx]
push edx
call fcn.004cc000
add esp, 0xc
mov dword [ebp - 0x456c], eax
cmp dword [ebp - 0x456c], 0
jle 0x4c679c
mov eax, 0x600
jmp 0x4c6c52
mov eax, dword [ebp - 0x4548]
mov ecx, dword [eax]
push ecx
call fcn.004cb910
add esp, 4
mov edx, dword [ebp - 0x4548]
mov dword [edx + 4], 0xffffffff
cmp dword [ebp - 0x456c], 0
jne 0x4c67cc
xor eax, eax
jmp 0x4c6c52
mov eax, 0x5000000
jmp 0x4c6c52
mov eax, dword [ebp - 0x4548]
cmp dword [eax + 4], 0xffffffff
je 0x4c67f3
mov ecx, dword [ebp - 0x4548]
mov edx, dword [ecx]
push edx
call fcn.004cb910
add esp, 4
mov eax, dword [ebp - 0x4548]
mov dword [eax + 4], 0xffffffff
mov ecx, dword [ebp - 0x4548]
mov edx, dword [ecx]
mov eax, dword [ebp + 8]
cmp eax, dword [edx + 4]
jl 0x4c681a
mov eax, 0x10000
jmp 0x4c6c52
mov ecx, dword [ebp - 0x4548]
mov edx, dword [ecx]
mov eax, dword [ebp + 8]
cmp eax, dword [edx + 0x10]
jge 0x4c683b
mov ecx, dword [ebp - 0x4548]
mov edx, dword [ecx]
push edx
call fcn.004cba10
add esp, 4
mov eax, dword [ebp - 0x4548]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x10]
cmp edx, dword [ebp + 8]
jge 0x4c685e
mov eax, dword [ebp - 0x4548]
mov ecx, dword [eax]
push ecx
call fcn.004cba90
add esp, 4
jmp 0x4c683b
lea edx, [ebp - 0x4544]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x4548]
call fcn.004c5990
mov ecx, dword [ebp - 0x443c]
and ecx, 0x10
je 0x4c68ca
cmp dword [ebp + 0x14], 1
jne 0x4c688c
xor eax, eax
jmp 0x4c6c52
push 0x103
lea edx, [ebp - 0x414]
push edx
lea eax, [ebp - 0x4540]
push eax
call fcn.004c6310
add esp, 0xc
lea ecx, [ebp - 0x414]
push ecx
mov edx, dword [ebp - 0x4548]
add edx, 0x138
push edx
call fcn.004c5740
add esp, 8
xor eax, eax
jmp 0x4c6c52
cmp dword [ebp + 0x14], 1
jne 0x4c68de
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x4554], eax
jmp 0x4c6b0f
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x4560], ecx
mov edx, dword [ebp - 0x4560]
mov dword [ebp - 0x4550], edx
mov eax, dword [ebp - 0x4550]
movzx ecx, word [eax]
test ecx, ecx
je 0x4c693c
mov edx, dword [ebp - 0x4550]
movzx eax, word [edx]
cmp eax, 0x2f
je 0x4c691c
mov ecx, dword [ebp - 0x4550]
movzx edx, word [ecx]
cmp edx, 0x5c
jne 0x4c692b
mov eax, dword [ebp - 0x4550]
add eax, 2
mov dword [ebp - 0x4560], eax
mov ecx, dword [ebp - 0x4550]
add ecx, 2
mov dword [ebp - 0x4550], ecx
jmp 0x4c68f3
mov edx, dword [ebp - 0x4560]
cmp edx, dword [ebp + 0xc]
je 0x4c6aeb
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x4564], eax
lea ecx, [ebp - 0x20c]
mov dword [ebp - 0x455c], ecx
mov edx, dword [ebp - 0x455c]
mov dword [ebp - 0x4588], edx
mov eax, dword [ebp - 0x4564]
mov cx, word [eax]
mov word [ebp - 0x4556], cx
mov edx, dword [ebp - 0x455c]
mov ax, word [ebp - 0x4556]
mov word [edx], ax
mov ecx, dword [ebp - 0x4564]
add ecx, 2
mov dword [ebp - 0x4564], ecx
mov edx, dword [ebp - 0x455c]
add edx, 2
mov dword [ebp - 0x455c], edx
cmp word [ebp - 0x4556], 0
jne 0x4c696c
mov eax, dword [ebp - 0x4560]
sub eax, dword [ebp + 0xc]
sar eax, 1
lea ecx, [eax + eax - 2]
mov dword [ebp - 0x4570], ecx
cmp dword [ebp - 0x4570], 0x208
jae 0x4c69d7
jmp 0x4c69dc
call fcn.004f48a4
xor edx, edx
mov eax, dword [ebp - 0x4570]
mov word [ebp + eax - 0x20c], dx
mov ecx, 2
imul edx, ecx, 0
movzx eax, word [ebp + edx - 0x20c]
cmp eax, 0x2f
je 0x4c6a37
mov ecx, 2
imul edx, ecx, 0
movzx eax, word [ebp + edx - 0x20c]
cmp eax, 0x5c
je 0x4c6a37
mov ecx, 2
shl ecx, 0
movzx edx, word [ebp + ecx - 0x20c]
cmp edx, 0x3a
je 0x4c6a37
mov dword [ebp - 0x4574], 0
jmp 0x4c6a41
mov dword [ebp - 0x4574], 1
mov al, byte [ebp - 0x4574]
mov byte [ebp - 0x454a], al
push 0x53426c
lea ecx, [ebp - 0x20c]
push ecx
call fcn.004ccdb0
add esp, 8
test eax, eax
je 0x4c6a71
mov dword [ebp - 0x4578], 1
jmp 0x4c6a7b
mov dword [ebp - 0x4578], 0
push 0x534274
lea edx, [ebp - 0x20c]
push edx
call fcn.004ccdb0
add esp, 8
test eax, eax
je 0x4c6a9f
mov dword [ebp - 0x457c], 1
jmp 0x4c6aa9
mov dword [ebp - 0x457c], 0
movzx eax, byte [ebp - 0x454a]
mov ecx, dword [ebp - 0x4578]
or ecx, dword [ebp - 0x457c]
or eax, ecx
mov byte [ebp - 0x454a], al
movzx edx, byte [ebp - 0x454a]
test edx, edx
jne 0x4c6aeb
lea eax, [ebp - 0x20c]
push eax
mov ecx, dword [ebp - 0x4548]
add ecx, 0x138
push ecx
call fcn.004c5740
add esp, 8
push 0
mov edx, dword [ebp - 0x443c]
push edx
push 2
push 0
push 0
push 0x40000000
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x4554], eax
cmp dword [ebp - 0x4554], 0xffffffff
jne 0x4c6b22
mov eax, 0x200
jmp 0x4c6c52
mov ecx, dword [ebp - 0x4548]
mov edx, dword [ecx]
push edx
call fcn.004cbb60
add esp, 4
mov byte [ebp - 0x4549], 0
push 0x4000
lea eax, [ebp - 0x4414]
push eax
mov ecx, dword [ebp - 0x4548]
mov edx, dword [ecx]
push edx
call fcn.004cc000
add esp, 0xc
mov dword [ebp - 0x4568], eax
cmp dword [ebp - 0x4568], 0
jge 0x4c6b6f
mov byte [ebp - 0x4549], 1
jmp 0x4c6bb8
cmp dword [ebp - 0x4568], 0
jne 0x4c6b7a
jmp 0x4c6bb8
push 0
lea eax, [ebp - 0x4418]
push eax
mov ecx, dword [ebp - 0x4568]
push ecx
lea edx, [ebp - 0x4414]
push edx
mov eax, dword [ebp - 0x4554]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x4580], eax
cmp dword [ebp - 0x4580], 0
jne 0x4c6bb6
mov byte [ebp - 0x4549], 1
jmp 0x4c6bb8
jmp 0x4c6b3a
mov byte [ebp - 0x454b], 0
mov ecx, dword [ebp - 0x4554]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov dword [ebp - 0x4584], eax
cmp dword [ebp - 0x4584], 1
jne 0x4c6bed
movzx edx, byte [ebp - 0x4549]
test edx, edx
jne 0x4c6bed
mov byte [ebp - 0x454b], 1
movzx eax, byte [ebp - 0x454b]
test eax, eax
je 0x4c6c1a
lea ecx, [ebp - 0x4428]
push ecx
lea edx, [ebp - 0x4438]
push edx
lea eax, [ebp - 0x4430]
push eax
mov ecx, dword [ebp - 0x4554]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x14], 1
je 0x4c6c2d
mov edx, dword [ebp - 0x4554]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x4548]
mov ecx, dword [eax]
push ecx
call fcn.004cb910
add esp, 4
movzx edx, byte [ebp - 0x4549]
test edx, edx
je 0x4c6c50
mov eax, 0x400
jmp 0x4c6c52
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f49c2
mov esp, ebp
pop ebp
ret 0x10