Function at 0x4c94f5
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x1ae8
call fcn.004c0690
mov eax, dword [0x517490]
xor eax, esp
mov dword [esp + 0x1ae4], eax
mov eax, dword [esp + 0x1aec]
xor edx, edx
mov ecx, dword [esp + 0x1af0]
push ebp
mov ebp, edx
mov dword [esp + 0x28], eax
push esi
mov esi, edx
mov dword [esp + 8], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 0x20], esi
cmp dword [esp + 0x1afc], edx
jne 0x4c9543
xor eax, eax
jmp 0x4c9c50
test ecx, ecx
jne 0x4c9566
call fcn.004c2a4e
and dword [eax], esi
call fcn.004c2a7f
mov dword [eax], 0x16
call fcn.004c40ce
or eax, 0xffffffff
jmp 0x4c9c50
push ebx
push edi
mov ecx, eax
mov edi, eax
sar ecx, 5
and edi, 0x1f
shl edi, 6
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x18], edi
mov ecx, dword [ecx*4 + 0x5297b8]
mov bl, byte [edi + ecx + 0x24]
add bl, bl
sar bl, 1
cmp bl, 2
je 0x4c9596
cmp bl, 1
jne 0x4c95c3
mov eax, dword [esp + 0x1b04]
not eax
test al, 1
jne 0x4c95bf
call fcn.004c2a4e
and dword [eax], esi
call fcn.004c2a7f
mov dword [eax], 0x16
call fcn.004c40ce
jmp 0x4c9c45
mov eax, dword [esp + 0x34]
test byte [edi + ecx + 4], 0x20
je 0x4c95d7
push 2
push edx
push edx
push eax
call fcn.004cae55
add esp, 0x10
push dword [esp + 0x34]
call fcn.004cd1ea
pop ecx
test eax, eax
je 0x4c98da
mov eax, dword [esp + 0x2c]
mov eax, dword [eax*4 + 0x5297b8]
test byte [edi + eax + 4], 0x80
je 0x4c98da
call fcn.004c75ad
xor ecx, ecx
mov eax, dword [eax + 0x6c]
cmp dword [eax + 0xa8], ecx
lea eax, [esp + 0x38]
push eax
mov eax, dword [esp + 0x30]
sete cl
mov dword [esp + 0x24], ecx
mov eax, dword [eax*4 + 0x5297b8]
push dword [edi + eax]
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x4c98da
cmp dword [esp + 0x20], esi
je 0x4c9645
test bl, bl
je 0x4c98da
call dword [sym.imp.KERNEL32.dll_GetConsoleCP]
xor ecx, ecx
mov dword [esp + 0x3c], eax
and dword [esp + 0x28], ecx
mov eax, dword [esp + 0x10]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], eax
cmp dword [esp + 0x1b04], ecx
jbe 0x4c9c15
xor edx, edx
mov dword [esp + 0x34], 0xa
mov dword [esp + 0x24], edx
and dword [esp + 0x20], ebp
test bl, bl
jne 0x4c97ea
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x2c]
mov edx, dword [eax*4 + 0x5297b8]
cmp dword [edi + edx + 0x38], ebp
je 0x4c96c0
mov al, byte [edi + edx + 0x34]
mov byte [esp + 0x40], al
lea eax, [esp + 0x40]
push 2
mov byte [esp + 0x45], cl
and dword [edi + edx + 0x38], ebp
push eax
jmp 0x4c9712
movsx eax, cl
push eax
call fcn.004ca9e3
pop ecx
test eax, eax
je 0x4c970c
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
sub eax, edx
add eax, dword [esp + 0x1b04]
cmp eax, 1
jbe 0x4c98ad
push 2
push edx
lea eax, [esp + 0x20]
push eax
call fcn.004cea9e
add esp, 0xc
cmp eax, 0xffffffff
je 0x4c9bff
mov eax, dword [esp + 0x1c]
inc eax
inc dword [esp + 0x24]
jmp 0x4c972c
push 1
push dword [esp + 0x20]
lea eax, [esp + 0x20]
push eax
call fcn.004cea9e
add esp, 0xc
cmp eax, 0xffffffff
je 0x4c9873
mov eax, dword [esp + 0x1c]
xor ecx, ecx
inc eax
inc dword [esp + 0x24]
push ecx
push ecx
push 5
mov dword [esp + 0x28], eax
lea eax, [esp + 0x4c]
push eax
push 1
lea eax, [esp + 0x2c]
push eax
push ecx
push dword [esp + 0x58]
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [esp + 0x20], eax
test eax, eax
je 0x4c9873
push 0
lea ecx, [esp + 0x2c]
push ecx
push eax
lea eax, [esp + 0x4c]
push eax
mov eax, dword [esp + 0x3c]
mov eax, dword [eax*4 + 0x5297b8]
push dword [edi + eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4c98d0
mov esi, dword [esp + 0x24]
mov edx, dword [esp + 0x14]
add esi, edx
mov eax, dword [esp + 0x20]
cmp dword [esp + 0x28], eax
jl 0x4c9c03
cmp dword [esp + 0x38], ebp
je 0x4c97e4
push 0
lea eax, [esp + 0x2c]
mov byte [esp + 0x44], 0xd
push eax
push 1
lea eax, [esp + 0x4c]
push eax
mov eax, dword [esp + 0x3c]
mov eax, dword [eax*4 + 0x5297b8]
push dword [edi + eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4c98d0
cmp dword [esp + 0x28], 1
jl 0x4c9873
inc dword [esp + 0x14]
inc esi
mov ecx, dword [esp + 0x18]
jmp 0x4c985e
cmp bl, 1
je 0x4c97f4
cmp bl, 2
jne 0x4c981b
movzx ecx, word [eax]
xor edx, edx
cmp cx, word [esp + 0x34]
mov dword [esp + 0x18], ecx
sete dl
add eax, 2
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x24]
add edx, 2
mov dword [esp + 0x1c], eax
mov dword [esp + 0x24], edx
cmp bl, 1
je 0x4c9825
cmp bl, 2
jne 0x4c9866
push ecx
call fcn.004ceef6
pop ecx
mov ecx, dword [esp + 0x18]
cmp ax, cx
jne 0x4c98d0
add esi, 2
cmp dword [esp + 0x20], ebp
je 0x4c985e
push 0xd
pop eax
push eax
mov dword [esp + 0x1c], eax
call fcn.004ceef6
pop ecx
mov ecx, dword [esp + 0x18]
cmp ax, cx
jne 0x4c98d0
inc esi
inc dword [esp + 0x14]
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x1c]
cmp edx, dword [esp + 0x1b04]
jb 0x4c967c
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
test esi, esi
jne 0x4c9c4a
test ebp, ebp
je 0x4c9c17
push 5
pop ebx
cmp ebp, ebx
jne 0x4c9c0c
call fcn.004c2a7f
mov dword [eax], 9
call fcn.004c2a4e
mov dword [eax], ebx
jmp 0x4c9c45
mov ebx, dword [esp + 0x2c]
inc esi
mov al, byte [edx]
mov ecx, dword [ebx*4 + 0x5297b8]
mov byte [edi + ecx + 0x34], al
mov eax, dword [ebx*4 + 0x5297b8]
mov dword [edi + eax + 0x38], 1
jmp 0x4c9873
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
jmp 0x4c9873
mov eax, dword [esp + 0x2c]
mov eax, dword [eax*4 + 0x5297b8]
test byte [edi + eax + 4], 0x80
je 0x4c9bbc
mov ecx, dword [esp + 0x10]
xor ebp, ebp
mov dword [esp + 0x24], ebp
mov edx, ecx
test bl, bl
jne 0x4c99b9
cmp dword [esp + 0x1b04], esi
jbe 0x4c9c17
mov eax, edx
lea edi, [esp + 0x6f4]
xor ecx, ecx
sub eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x1b04]
jae 0x4c9947
mov bl, byte [edx]
inc edx
inc eax
cmp bl, 0xa
jne 0x4c993b
inc dword [esp + 0x14]
mov byte [edi], 0xd
inc edi
inc ecx
mov byte [edi], bl
inc edi
inc ecx
cmp ecx, 0x13ff
jb 0x4c9920
mov ebx, dword [esp + 0x18]
lea eax, [esp + 0x6f4]
sub edi, eax
mov dword [esp + 0x20], edx
push 0
lea eax, [esp + 0x34]
push eax
push edi
lea eax, [esp + 0x700]
push eax
mov eax, dword [esp + 0x3c]
mov eax, dword [eax*4 + 0x5297b8]
push dword [ebx + eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4c99aa
add esi, dword [esp + 0x30]
mov ecx, dword [esp + 0x10]
cmp dword [esp + 0x30], edi
jl 0x4c99a3
mov edx, dword [esp + 0x20]
mov eax, edx
sub eax, ecx
cmp eax, dword [esp + 0x1b04]
jb 0x4c9911
mov edi, ebx
jmp 0x4c9877
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
mov edi, ebx
jmp 0x4c9873
cmp bl, 2
jne 0x4c9a94
cmp dword [esp + 0x1b04], esi
jbe 0x4c9c17
and dword [esp + 0x38], 0
lea ebx, [esp + 0x6f4]
push 0xd
pop esi
mov eax, edx
push 0xa
sub eax, ecx
mov ecx, dword [esp + 0x3c]
pop ebp
cmp eax, dword [esp + 0x1b04]
jae 0x4c9a1f
movzx edi, word [edx]
add eax, 2
add edx, 2
cmp di, bp
jne 0x4c9a0e
add dword [esp + 0x14], 2
mov word [ebx], si
add ebx, 2
add ecx, 2
mov word [ebx], di
add ecx, 2
add ebx, 2
cmp ecx, 0x13fe
jb 0x4c99e9
mov edi, dword [esp + 0x18]
lea eax, [esp + 0x6f4]
sub ebx, eax
mov dword [esp + 0x20], edx
push 0
lea eax, [esp + 0x34]
push eax
push ebx
lea eax, [esp + 0x700]
push eax
mov eax, dword [esp + 0x3c]
mov eax, dword [eax*4 + 0x5297b8]
push dword [edi + eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, dword [esp + 0x28]
mov ebp, dword [esp + 0x24]
test eax, eax
je 0x4c98d0
add esi, dword [esp + 0x30]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x28], esi
cmp dword [esp + 0x30], ebx
jl 0x4c9877
mov edx, dword [esp + 0x20]
mov eax, edx
sub eax, ecx
cmp eax, dword [esp + 0x1b04]
jb 0x4c99cf
jmp 0x4c9877
mov ebx, dword [esp + 0x1b04]
mov dword [esp + 0x1c], edx
test ebx, ebx
je 0x4c9c17
mov dword [esp + 0x34], 0xa
and dword [esp + 0x38], 0
lea eax, [esp + 0x48]
mov edi, dword [esp + 0x1c]
sub edx, ecx
mov ecx, dword [esp + 0x38]
push 0xd
pop esi
cmp edx, ebx
jae 0x4c9af3
movzx ebp, word [edi]
add edx, 2
add edi, 2
cmp bp, word [esp + 0x34]
jne 0x4c9ae2
mov word [eax], si
add eax, 2
add ecx, 2
mov word [eax], bp
add ecx, 2
add eax, 2
cmp ecx, 0x6a8
jb 0x4c9ac5
xor ebp, ebp
mov dword [esp + 0x1c], edi
push ebp
push ebp
push 0xd55
lea ecx, [esp + 0x700]
push ecx
lea ecx, [esp + 0x58]
sub eax, ecx
cdq
sub eax, edx
sar eax, 1
push eax
mov eax, ecx
push eax
push ebp
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov esi, dword [esp + 0x28]
mov ebp, dword [esp + 0x24]
mov edi, dword [esp + 0x18]
mov dword [esp + 0x20], eax
test eax, eax
je 0x4c98d0
xor ecx, ecx
mov dword [esp + 0x28], ecx
push 0
sub eax, ecx
lea edx, [esp + 0x34]
push edx
push eax
lea eax, [esp + 0x700]
add eax, ecx
push eax
mov eax, dword [esp + 0x3c]
mov eax, dword [eax*4 + 0x5297b8]
push dword [edi + eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4c9b83
mov ecx, dword [esp + 0x28]
add ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x20]
mov dword [esp + 0x28], ecx
cmp eax, ecx
jg 0x4c9b41
jmp 0x4c9b97
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x28]
mov ebp, eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x24], ebp
cmp eax, ecx
mov ecx, dword [esp + 0x10]
jg 0x4c9877
mov edx, dword [esp + 0x1c]
mov esi, edx
sub esi, ecx
mov dword [esp + 0x28], esi
cmp esi, ebx
jb 0x4c9aaf
jmp 0x4c9877
push 0
lea ecx, [esp + 0x34]
push ecx
push dword [esp + 0x1b0c]
push dword [esp + 0x1c]
push dword [edi + eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4c9bec
mov esi, dword [esp + 0x30]
xor ebp, ebp
mov ecx, dword [esp + 0x10]
mov edx, ebp
jmp 0x4c987b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x10]
mov ebp, eax
mov edx, esi
jmp 0x4c987b
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
jmp 0x4c987b
push ebp
call fcn.004c2a61
pop ecx
jmp 0x4c9c45
mov ecx, eax
mov eax, dword [esp + 0x2c]
mov eax, dword [eax*4 + 0x5297b8]
test byte [edi + eax + 4], 0x40
je 0x4c9c32
cmp byte [ecx], 0x1a
jne 0x4c9c32
xor eax, eax
jmp 0x4c9c4e
call fcn.004c2a7f
mov dword [eax], 0x1c
call fcn.004c2a4e
and dword [eax], 0
or eax, 0xffffffff
jmp 0x4c9c4e
sub esi, edx
mov eax, esi
pop edi
pop ebx
mov ecx, dword [esp + 0x1aec]
pop esi
pop ebp
xor ecx, esp
call fcn.004b94b6
add esp, 0x1ae8
ret