Function at 0x47c5b0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4584
call fcn.004bb170
mov eax, dword [0x542af0]
xor eax, ebp
mov dword [ebp - 0xc], eax
push ebx
push esi
mov dword [ebp - 0x4580], ecx
cmp dword [ebp + 0x14], 3
je 0x47c5eb
cmp dword [ebp + 0x14], 2
je 0x47c5eb
cmp dword [ebp + 0x14], 1
je 0x47c5eb
mov eax, 0x10000
jmp 0x47caa5
cmp dword [ebp + 0x14], 3
jne 0x47c718
mov eax, dword [ebp - 0x4580]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 4]
je 0x47c6ac
mov edx, dword [ebp - 0x4580]
cmp dword [edx + 4], 0xffffffff
je 0x47c624
mov eax, dword [ebp - 0x4580]
mov ecx, dword [eax]
push ecx
call fcn.0047ba30
add esp, 4
mov edx, dword [ebp - 0x4580]
mov dword [edx + 4], 0xffffffff
mov eax, dword [ebp - 0x4580]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx + 4]
jl 0x47c64b
mov eax, 0x10000
jmp 0x47caa5
mov eax, dword [ebp - 0x4580]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx + 0x10]
jge 0x47c66c
mov eax, dword [ebp - 0x4580]
mov ecx, dword [eax]
push ecx
call fcn.0047af00
add esp, 4
mov edx, dword [ebp - 0x4580]
mov eax, dword [edx]
mov ecx, dword [eax + 0x10]
cmp ecx, dword [ebp + 8]
jge 0x47c68f
mov edx, dword [ebp - 0x4580]
mov eax, dword [edx]
push eax
call fcn.0047af70
add esp, 4
jmp 0x47c66c
mov ecx, dword [ebp - 0x4580]
mov edx, dword [ecx]
push edx
call fcn.0047b420
add esp, 4
mov eax, dword [ebp - 0x4580]
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 - 0x4580]
mov edx, dword [ecx]
push edx
call fcn.0047b5e0
add esp, 0xc
mov dword [ebp - 0x414c], eax
cmp dword [ebp - 0x414c], 0
jle 0x47c6de
mov eax, 0x600
jmp 0x47caa5
mov eax, dword [ebp - 0x4580]
mov ecx, dword [eax]
push ecx
call fcn.0047ba30
add esp, 4
mov edx, dword [ebp - 0x4580]
mov dword [edx + 4], 0xffffffff
cmp dword [ebp - 0x414c], 0
jne 0x47c70e
xor eax, eax
jmp 0x47caa5
mov eax, 0x5000000
jmp 0x47caa5
mov eax, dword [ebp - 0x4580]
cmp dword [eax + 4], 0xffffffff
je 0x47c735
mov ecx, dword [ebp - 0x4580]
mov edx, dword [ecx]
push edx
call fcn.0047ba30
add esp, 4
mov eax, dword [ebp - 0x4580]
mov dword [eax + 4], 0xffffffff
mov ecx, dword [ebp - 0x4580]
mov edx, dword [ecx]
mov eax, dword [ebp + 8]
cmp eax, dword [edx + 4]
jl 0x47c75c
mov eax, 0x10000
jmp 0x47caa5
mov ecx, dword [ebp - 0x4580]
mov edx, dword [ecx]
mov eax, dword [ebp + 8]
cmp eax, dword [edx + 0x10]
jge 0x47c77d
mov ecx, dword [ebp - 0x4580]
mov edx, dword [ecx]
push edx
call fcn.0047af00
add esp, 4
mov eax, dword [ebp - 0x4580]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x10]
cmp edx, dword [ebp + 8]
jge 0x47c7a0
mov eax, dword [ebp - 0x4580]
mov ecx, dword [eax]
push ecx
call fcn.0047af70
add esp, 4
jmp 0x47c77d
lea edx, [ebp - 0x140]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x4580]
call fcn.0047bd10
mov ecx, dword [ebp - 0x38]
and ecx, 0x10
je 0x47c809
cmp dword [ebp + 0x14], 1
jne 0x47c7cb
xor eax, eax
jmp 0x47caa5
push 0x103
lea edx, [ebp - 0x4358]
push edx
lea eax, [ebp - 0x13c]
push eax
call fcn.0047cac0
add esp, 0xc
lea ecx, [ebp - 0x4358]
push ecx
mov edx, dword [ebp - 0x4580]
add edx, 0x138
push edx
call fcn.0047c490
add esp, 8
xor eax, eax
jmp 0x47caa5
cmp dword [ebp + 0x14], 1
jne 0x47c81a
mov eax, dword [ebp + 0xc]
mov dword [ebp - 4], eax
jmp 0x47c980
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x435c], ecx
mov edx, dword [ebp - 0x435c]
mov dword [ebp - 0x4360], edx
mov eax, dword [ebp - 0x4360]
movzx ecx, word [eax]
test ecx, ecx
je 0x47c878
mov edx, dword [ebp - 0x4360]
movzx eax, word [edx]
cmp eax, 0x2f
je 0x47c858
mov ecx, dword [ebp - 0x4360]
movzx edx, word [ecx]
cmp edx, 0x5c
jne 0x47c867
mov eax, dword [ebp - 0x4360]
add eax, 2
mov dword [ebp - 0x435c], eax
mov ecx, dword [ebp - 0x4360]
add ecx, 2
mov dword [ebp - 0x4360], ecx
jmp 0x47c82f
mov edx, dword [ebp - 0x435c]
cmp edx, dword [ebp + 0xc]
je 0x47c962
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [ebp - 0x4570]
push ecx
call fcn.004bc193
add esp, 8
mov edx, dword [ebp - 0x435c]
sub edx, dword [ebp + 0xc]
sar edx, 1
xor eax, eax
mov word [ebp + edx*2 - 0x4572], ax
movzx ecx, word [ebp - 0x4570]
cmp ecx, 0x2f
je 0x47c8df
movzx edx, word [ebp - 0x4570]
cmp edx, 0x5c
je 0x47c8df
movzx eax, word [ebp - 0x456e]
cmp eax, 0x3a
je 0x47c8df
mov dword [ebp - 0x4584], 0
jmp 0x47c8e9
mov dword [ebp - 0x4584], 1
mov cl, byte [ebp - 0x4584]
mov byte [ebp - 0x4361], cl
movzx ebx, byte [ebp - 0x4361]
push 0x507058
lea edx, [ebp - 0x4570]
push edx
call fcn.004393a0
add esp, 8
mov esi, eax
neg esi
sbb esi, esi
neg esi
push 0x507060
lea eax, [ebp - 0x4570]
push eax
call fcn.004393a0
add esp, 8
neg eax
sbb eax, eax
neg eax
or esi, eax
or ebx, esi
mov byte [ebp - 0x4361], bl
movzx ecx, byte [ebp - 0x4361]
test ecx, ecx
jne 0x47c962
lea edx, [ebp - 0x4570]
push edx
mov eax, dword [ebp - 0x4580]
add eax, 0x138
push eax
call fcn.0047c490
add esp, 8
push 0
mov ecx, dword [ebp - 0x38]
push ecx
push 2
push 0
push 0
push 0x40000000
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x47c990
mov eax, 0x200
jmp 0x47caa5
mov eax, dword [ebp - 0x4580]
mov ecx, dword [eax]
push ecx
call fcn.0047b420
add esp, 4
mov byte [ebp - 0x142], 0
push 0x4000
lea edx, [ebp - 0x4148]
push edx
mov eax, dword [ebp - 0x4580]
mov ecx, dword [eax]
push ecx
call fcn.0047b5e0
add esp, 0xc
mov dword [ebp - 0x4574], eax
cmp dword [ebp - 0x4574], 0
jge 0x47c9dd
mov byte [ebp - 0x142], 1
jmp 0x47ca23
cmp dword [ebp - 0x4574], 0
jne 0x47c9e8
jmp 0x47ca23
push 0
lea edx, [ebp - 0x457c]
push edx
mov eax, dword [ebp - 0x4574]
push eax
lea ecx, [ebp - 0x4148]
push ecx
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x4578], eax
cmp dword [ebp - 0x4578], 0
jne 0x47ca21
mov byte [ebp - 0x142], 1
jmp 0x47ca23
jmp 0x47c9a8
mov byte [ebp - 0x141], 0
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 1
jne 0x47ca4f
movzx ecx, byte [ebp - 0x142]
test ecx, ecx
jne 0x47ca4f
mov byte [ebp - 0x141], 1
movzx edx, byte [ebp - 0x141]
test edx, edx
je 0x47ca70
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x34]
push ecx
lea edx, [ebp - 0x2c]
push edx
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x14], 1
je 0x47ca80
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x4580]
mov eax, dword [edx]
push eax
call fcn.0047ba30
add esp, 4
movzx ecx, byte [ebp - 0x142]
test ecx, ecx
je 0x47caa3
mov eax, 0x400
jmp 0x47caa5
xor eax, eax
pop esi
pop ebx
mov ecx, dword [ebp - 0xc]
xor ecx, ebp
call fcn.004b5c1a
mov esp, ebp
pop ebp
ret 0x10