Function at 0x4c34a0
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x1ae8
call fcn.004ba2e0
mov eax, dword [0x5107c0]
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 0x4c34ee
xor eax, eax
jmp 0x4c3bfb
test ecx, ecx
jne 0x4c3511
call fcn.004bc74e
and dword [eax], esi
call fcn.004bc77f
mov dword [eax], 0x16
call fcn.004bdd46
or eax, 0xffffffff
jmp 0x4c3bfb
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 + 0x520f18]
mov bl, byte [edi + ecx + 0x24]
add bl, bl
sar bl, 1
cmp bl, 2
je 0x4c3541
cmp bl, 1
jne 0x4c356e
mov eax, dword [esp + 0x1b04]
not eax
test al, 1
jne 0x4c356a
call fcn.004bc74e
and dword [eax], esi
call fcn.004bc77f
mov dword [eax], 0x16
call fcn.004bdd46
jmp 0x4c3bf0
mov eax, dword [esp + 0x34]
test byte [edi + ecx + 4], 0x20
je 0x4c3582
push 2
push edx
push edx
push eax
call fcn.004c3f8d
add esp, 0x10
push dword [esp + 0x34]
call fcn.004c745b
pop ecx
test eax, eax
je 0x4c3885
mov eax, dword [esp + 0x2c]
mov eax, dword [eax*4 + 0x520f18]
test byte [edi + eax + 4], 0x80
je 0x4c3885
call fcn.004be8ad
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 + 0x520f18]
push dword [edi + eax]
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x4c3885
cmp dword [esp + 0x20], esi
je 0x4c35f0
test bl, bl
je 0x4c3885
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 0x4c3bc0
xor edx, edx
mov dword [esp + 0x34], 0xa
mov dword [esp + 0x24], edx
and dword [esp + 0x20], ebp
test bl, bl
jne 0x4c3795
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 + 0x520f18]
cmp dword [edi + edx + 0x38], ebp
je 0x4c366b
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 0x4c36bd
movsx eax, cl
push eax
call fcn.004c3050
pop ecx
test eax, eax
je 0x4c36b7
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
sub eax, edx
add eax, dword [esp + 0x1b04]
cmp eax, 1
jbe 0x4c3858
push 2
push edx
lea eax, [esp + 0x20]
push eax
call fcn.004c7786
add esp, 0xc
cmp eax, 0xffffffff
je 0x4c3baa
mov eax, dword [esp + 0x1c]
inc eax
inc dword [esp + 0x24]
jmp 0x4c36d7
push 1
push dword [esp + 0x20]
lea eax, [esp + 0x20]
push eax
call fcn.004c7786
add esp, 0xc
cmp eax, 0xffffffff
je 0x4c381e
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 0x4c381e
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 + 0x520f18]
push dword [edi + eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4c387b
mov esi, dword [esp + 0x24]
mov edx, dword [esp + 0x14]
add esi, edx
mov eax, dword [esp + 0x20]
cmp dword [esp + 0x28], eax
jl 0x4c3bae
cmp dword [esp + 0x38], ebp
je 0x4c378f
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 + 0x520f18]
push dword [edi + eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4c387b
cmp dword [esp + 0x28], 1
jl 0x4c381e
inc dword [esp + 0x14]
inc esi
mov ecx, dword [esp + 0x18]
jmp 0x4c3809
cmp bl, 1
je 0x4c379f
cmp bl, 2
jne 0x4c37c6
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 0x4c37d0
cmp bl, 2
jne 0x4c3811
push ecx
call fcn.004c900f
pop ecx
mov ecx, dword [esp + 0x18]
cmp ax, cx
jne 0x4c387b
add esi, 2
cmp dword [esp + 0x20], ebp
je 0x4c3809
push 0xd
pop eax
push eax
mov dword [esp + 0x1c], eax
call fcn.004c900f
pop ecx
mov ecx, dword [esp + 0x18]
cmp ax, cx
jne 0x4c387b
inc esi
inc dword [esp + 0x14]
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x1c]
cmp edx, dword [esp + 0x1b04]
jb 0x4c3627
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
test esi, esi
jne 0x4c3bf5
test ebp, ebp
je 0x4c3bc2
push 5
pop ebx
cmp ebp, ebx
jne 0x4c3bb7
call fcn.004bc77f
mov dword [eax], 9
call fcn.004bc74e
mov dword [eax], ebx
jmp 0x4c3bf0
mov ebx, dword [esp + 0x2c]
inc esi
mov al, byte [edx]
mov ecx, dword [ebx*4 + 0x520f18]
mov byte [edi + ecx + 0x34], al
mov eax, dword [ebx*4 + 0x520f18]
mov dword [edi + eax + 0x38], 1
jmp 0x4c381e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
jmp 0x4c381e
mov eax, dword [esp + 0x2c]
mov eax, dword [eax*4 + 0x520f18]
test byte [edi + eax + 4], 0x80
je 0x4c3b67
mov ecx, dword [esp + 0x10]
xor ebp, ebp
mov dword [esp + 0x24], ebp
mov edx, ecx
test bl, bl
jne 0x4c3964
cmp dword [esp + 0x1b04], esi
jbe 0x4c3bc2
mov eax, edx
lea edi, [esp + 0x6f4]
xor ecx, ecx
sub eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x1b04]
jae 0x4c38f2
mov bl, byte [edx]
inc edx
inc eax
cmp bl, 0xa
jne 0x4c38e6
inc dword [esp + 0x14]
mov byte [edi], 0xd
inc edi
inc ecx
mov byte [edi], bl
inc edi
inc ecx
cmp ecx, 0x13ff
jb 0x4c38cb
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 + 0x520f18]
push dword [ebx + eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4c3955
add esi, dword [esp + 0x30]
mov ecx, dword [esp + 0x10]
cmp dword [esp + 0x30], edi
jl 0x4c394e
mov edx, dword [esp + 0x20]
mov eax, edx
sub eax, ecx
cmp eax, dword [esp + 0x1b04]
jb 0x4c38bc
mov edi, ebx
jmp 0x4c3822
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
mov edi, ebx
jmp 0x4c381e
cmp bl, 2
jne 0x4c3a3f
cmp dword [esp + 0x1b04], esi
jbe 0x4c3bc2
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 0x4c39ca
movzx edi, word [edx]
add eax, 2
add edx, 2
cmp di, bp
jne 0x4c39b9
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 0x4c3994
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 + 0x520f18]
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 0x4c387b
add esi, dword [esp + 0x30]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x28], esi
cmp dword [esp + 0x30], ebx
jl 0x4c3822
mov edx, dword [esp + 0x20]
mov eax, edx
sub eax, ecx
cmp eax, dword [esp + 0x1b04]
jb 0x4c397a
jmp 0x4c3822
mov ebx, dword [esp + 0x1b04]
mov dword [esp + 0x1c], edx
test ebx, ebx
je 0x4c3bc2
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 0x4c3a9e
movzx ebp, word [edi]
add edx, 2
add edi, 2
cmp bp, word [esp + 0x34]
jne 0x4c3a8d
mov word [eax], si
add eax, 2
add ecx, 2
mov word [eax], bp
add ecx, 2
add eax, 2
cmp ecx, 0x6a8
jb 0x4c3a70
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 0x4c387b
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 + 0x520f18]
push dword [edi + eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4c3b2e
mov ecx, dword [esp + 0x28]
add ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x20]
mov dword [esp + 0x28], ecx
cmp eax, ecx
jg 0x4c3aec
jmp 0x4c3b42
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 0x4c3822
mov edx, dword [esp + 0x1c]
mov esi, edx
sub esi, ecx
mov dword [esp + 0x28], esi
cmp esi, ebx
jb 0x4c3a5a
jmp 0x4c3822
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 0x4c3b97
mov esi, dword [esp + 0x30]
xor ebp, ebp
mov ecx, dword [esp + 0x10]
mov edx, ebp
jmp 0x4c3826
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x10]
mov ebp, eax
mov edx, esi
jmp 0x4c3826
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
jmp 0x4c3826
push ebp
call fcn.004bc761
pop ecx
jmp 0x4c3bf0
mov ecx, eax
mov eax, dword [esp + 0x2c]
mov eax, dword [eax*4 + 0x520f18]
test byte [edi + eax + 4], 0x40
je 0x4c3bdd
cmp byte [ecx], 0x1a
jne 0x4c3bdd
xor eax, eax
jmp 0x4c3bf9
call fcn.004bc77f
mov dword [eax], 0x1c
call fcn.004bc74e
and dword [eax], 0
or eax, 0xffffffff
jmp 0x4c3bf9
sub esi, edx
mov eax, esi
pop edi
pop ebx
mov ecx, dword [esp + 0x1aec]
pop esi
pop ebp
xor ecx, esp
call fcn.004b35e5
add esp, 0x1ae8
ret