Function at 0x41c141
Capabilities:
Write file on windows

Disassembly:
mov esi, esi
push ebp
mov ebp, esp
mov eax, 0x1ae4
call fcn.0041f770
mov eax, dword [0x477084]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
push esi
mov dword [ebp - 0x1acc], eax
xor esi, esi
mov dword [ebp - 0x1ac8], esi
mov dword [ebp - 0x1ad0], esi
cmp dword [ebp + 0x10], esi
jne 0x41c182
xor eax, eax
jmp 0x41c830
cmp eax, esi
jne 0x41c1a5
call fcn.00414b2a
mov dword [eax], esi
call fcn.00414b17
mov dword [eax], 0x16
call fcn.00414ac5
or eax, 0xffffffff
jmp 0x41c830
mov eax, edi
sar eax, 5
mov esi, edi
push ebx
lea ebx, [eax*4 + 0x47b7a0]
mov eax, dword [ebx]
and esi, 0x1f
shl esi, 6
mov cl, byte [eax + esi + 0x24]
add cl, cl
sar cl, 1
mov dword [ebp - 0x1adc], ebx
mov byte [ebp - 0x1ac1], cl
cmp cl, 2
je 0x41c1da
cmp cl, 1
jne 0x41c201
mov ecx, dword [ebp + 0x10]
not ecx
test cl, 1
jne 0x41c201
call fcn.00414b2a
and dword [eax], 0
call fcn.00414b17
mov dword [eax], 0x16
call fcn.00414ac5
jmp 0x41c81e
test byte [eax + esi + 4], 0x20
je 0x41c217
push 2
push 0
push 0
push edi
call fcn.0041bfd2
add esp, 0x10
push edi
call fcn.0041c95b
test eax, eax
pop ecx
je 0x41c4bf
mov eax, dword [ebx]
test byte [esi + eax + 4], 0x80
je 0x41c4bf
call fcn.004170a8
mov eax, dword [eax + 0x6c]
xor ecx, ecx
cmp dword [eax + 0x14], ecx
sete cl
lea eax, [ebp - 0x1ae0]
push eax
mov eax, dword [ebx]
mov edi, ecx
push dword [esi + eax]
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
xor ecx, ecx
cmp eax, ecx
je 0x41c4c1
cmp edi, ecx
je 0x41c271
cmp byte [ebp - 0x1ac1], cl
je 0x41c4c1
call dword [sym.imp.KERNEL32.dll_GetConsoleCP]
mov edi, dword [ebp - 0x1acc]
mov dword [ebp - 0x1ae0], eax
xor eax, eax
mov dword [ebp - 0x1ad4], eax
cmp dword [ebp + 0x10], eax
jbe 0x41c7b7
mov dword [ebp - 0x1ac0], eax
mov al, byte [ebp - 0x1ac1]
test al, al
jne 0x41c40f
xor eax, eax
mov cl, byte [edi]
mov ebx, dword [ebp - 0x1adc]
cmp cl, 0xa
sete al
mov dword [ebp - 0x1ae4], eax
mov eax, dword [ebx]
add eax, esi
cmp dword [eax + 0x38], 0
je 0x41c2dd
mov dl, byte [eax + 0x34]
lea ebx, [ebp - 0xc]
mov byte [ebp - 0xc], dl
mov byte [ebp - 0xb], cl
and dword [eax + 0x38], 0
push 2
push ebx
jmp 0x41c328
movsx eax, cl
push eax
call fcn.004138f9
pop ecx
test eax, eax
je 0x41c325
mov ecx, dword [ebp - 0x1acc]
sub ecx, edi
add ecx, dword [ebp + 0x10]
xor eax, eax
inc eax
cmp ecx, eax
jbe 0x41c4a6
push 2
lea eax, [ebp - 0x1abc]
push edi
push eax
call fcn.0041e4d1
add esp, 0xc
cmp eax, 0xffffffff
je 0x41c7ae
inc edi
inc dword [ebp - 0x1ac0]
jmp 0x41c340
push 1
push edi
lea eax, [ebp - 0x1abc]
push eax
call fcn.0041e4d1
add esp, 0xc
cmp eax, 0xffffffff
je 0x41c7ae
xor eax, eax
push eax
inc edi
push eax
push 5
lea ebx, [ebp - 0xc]
push ebx
push 1
lea ecx, [ebp - 0x1abc]
push ecx
push eax
push dword [ebp - 0x1ae0]
inc dword [ebp - 0x1ac0]
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebx, eax
test ebx, ebx
je 0x41c7ae
lea eax, [ebp - 0x1ad4]
push 0
push eax
lea eax, [ebp - 0xc]
push ebx
push eax
mov eax, dword [ebp - 0x1adc]
mov eax, dword [eax]
push dword [esi + eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41c7a2
mov eax, dword [ebp - 0x1ac0]
mov ecx, dword [ebp - 0x1ad0]
add eax, ecx
mov dword [ebp - 0x1ac8], eax
cmp dword [ebp - 0x1ad4], ebx
jl 0x41c7ae
cmp dword [ebp - 0x1ae4], 0
je 0x41c492
push 0
lea eax, [ebp - 0xc]
lea ebx, [ebp - 0x1ad4]
push ebx
push 1
push eax
mov eax, dword [ebp - 0x1adc]
mov eax, dword [eax]
mov byte [ebp - 0xc], 0xd
push dword [esi + eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41c7a2
cmp dword [ebp - 0x1ad4], 1
jl 0x41c7ae
inc dword [ebp - 0x1ad0]
inc dword [ebp - 0x1ac8]
jmp 0x41c492
cmp al, 1
je 0x41c417
cmp al, 2
jne 0x41c438
xor ecx, ecx
movzx ebx, word [edi]
cmp ebx, 0xa
sete cl
add edi, 2
add dword [ebp - 0x1ac0], 2
mov dword [ebp - 0x1abc], ebx
mov dword [ebp - 0x1ae4], ecx
cmp al, 1
je 0x41c440
cmp al, 2
jne 0x41c492
push dword [ebp - 0x1abc]
call fcn.0041f725
cmp ax, word [ebp - 0x1abc]
pop ecx
jne 0x41c7a2
add dword [ebp - 0x1ac8], 2
cmp dword [ebp - 0x1ae4], 0
je 0x41c492
push 0xd
pop eax
push eax
mov dword [ebp - 0x1abc], eax
call fcn.0041f725
cmp ax, word [ebp - 0x1abc]
pop ecx
jne 0x41c7a2
inc dword [ebp - 0x1ac8]
inc dword [ebp - 0x1ad0]
mov eax, dword [ebp + 0x10]
cmp dword [ebp - 0x1ac0], eax
jb 0x41c29a
jmp 0x41c7ae
mov ecx, dword [ebx]
mov dl, byte [edi]
inc dword [ebp - 0x1ac8]
mov byte [esi + ecx + 0x34], dl
mov ecx, dword [ebx]
mov dword [esi + ecx + 0x38], eax
jmp 0x41c7ae
xor ecx, ecx
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x80
je 0x41c76f
cmp byte [ebp - 0x1ac1], 0
mov dword [ebp - 0x1abc], ecx
jne 0x41c589
mov ebx, dword [ebp - 0x1acc]
cmp dword [ebp + 0x10], ecx
jbe 0x41c7ed
mov ecx, ebx
xor edi, edi
sub ecx, dword [ebp - 0x1acc]
lea eax, [ebp - 0x1ab8]
cmp ecx, dword [ebp + 0x10]
jae 0x41c52b
mov dl, byte [ebx]
inc ebx
inc ecx
cmp dl, 0xa
mov dword [ebp - 0x1ae0], ebx
jne 0x41c51f
inc dword [ebp - 0x1ad0]
mov byte [eax], 0xd
inc eax
inc edi
mov byte [eax], dl
inc eax
inc edi
cmp edi, 0x13ff
jb 0x41c500
mov edi, eax
lea eax, [ebp - 0x1ab8]
push 0
sub edi, eax
lea eax, [ebp - 0x1ad8]
push eax
lea eax, [ebp - 0x1ab8]
push edi
push eax
mov eax, dword [ebp - 0x1adc]
mov eax, dword [eax]
push dword [esi + eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41c7a2
mov eax, dword [ebp - 0x1ad8]
add dword [ebp - 0x1ac8], eax
cmp eax, edi
jl 0x41c7ae
mov eax, ebx
sub eax, dword [ebp - 0x1acc]
cmp eax, dword [ebp + 0x10]
jb 0x41c4f0
jmp 0x41c7ae
cmp byte [ebp - 0x1ac1], 2
jne 0x41c663
mov ebx, dword [ebp - 0x1acc]
cmp dword [ebp + 0x10], ecx
jbe 0x41c7ed
lea eax, [ebp - 0x1ab8]
and dword [ebp - 0x1ac0], 0
mov ecx, ebx
sub ecx, dword [ebp - 0x1acc]
push 2
pop edi
cmp ecx, dword [ebp + 0x10]
jae 0x41c605
movzx edx, word [ebx]
add ebx, edi
add ecx, edi
mov dword [ebp - 0x1ae0], ebx
cmp edx, 0xa
jne 0x41c5ee
add dword [ebp - 0x1ad0], edi
push 0xd
pop ebx
mov word [eax], bx
add eax, edi
mov ebx, dword [ebp - 0x1ae0]
add dword [ebp - 0x1ac0], edi
add dword [ebp - 0x1ac0], edi
mov word [eax], dx
add eax, edi
cmp dword [ebp - 0x1ac0], 0x13fe
jb 0x41c5bd
push 0
mov edi, eax
lea eax, [ebp - 0x1ab8]
sub edi, eax
lea eax, [ebp - 0x1ad8]
push eax
lea eax, [ebp - 0x1ab8]
push edi
push eax
mov eax, dword [ebp - 0x1adc]
mov eax, dword [eax]
push dword [esi + eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41c7a2
mov eax, dword [ebp - 0x1ad8]
add dword [ebp - 0x1ac8], eax
cmp eax, edi
jl 0x41c7ae
mov eax, ebx
sub eax, dword [ebp - 0x1acc]
cmp eax, dword [ebp + 0x10]
jb 0x41c5a5
jmp 0x41c7ae
mov ebx, dword [ebp - 0x1acc]
mov dword [ebp - 0x1ad4], ebx
cmp dword [ebp + 0x10], ecx
jbe 0x41c7ed
mov edx, dword [ebp - 0x1ad4]
and dword [ebp - 0x1ac0], 0
lea eax, [ebp - 0x6b8]
sub edx, dword [ebp - 0x1acc]
push 2
pop edi
cmp edx, dword [ebp + 0x10]
jae 0x41c6d4
mov ecx, dword [ebp - 0x1ad4]
movzx ecx, word [ecx]
add dword [ebp - 0x1ad4], edi
add edx, edi
cmp ecx, 0xa
jne 0x41c6bd
push 0xd
pop ebx
mov word [eax], bx
add eax, edi
add dword [ebp - 0x1ac0], edi
add dword [ebp - 0x1ac0], edi
mov word [eax], cx
add eax, edi
cmp dword [ebp - 0x1ac0], 0x6a8
jb 0x41c694
lea edx, [ebp - 0x1410]
xor edi, edi
lea ecx, [ebp - 0x6b8]
push edi
push edi
push 0xd55
push edx
sub eax, ecx
cdq
sub eax, edx
sar eax, 1
push eax
mov eax, ecx
push eax
push edi
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebx, eax
cmp ebx, edi
je 0x41c7a2
lea eax, [ebp - 0x1ad8]
push 0
push eax
mov eax, ebx
sub eax, edi
push eax
lea eax, [ebp + edi - 0x1410]
push eax
mov eax, dword [ebp - 0x1adc]
mov eax, dword [eax]
push dword [esi + eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41c742
add edi, dword [ebp - 0x1ad8]
cmp ebx, edi
jg 0x41c70b
jmp 0x41c74e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1abc], eax
cmp ebx, edi
jg 0x41c7ae
mov eax, dword [ebp - 0x1ad4]
sub eax, dword [ebp - 0x1acc]
mov dword [ebp - 0x1ac8], eax
cmp eax, dword [ebp + 0x10]
jb 0x41c678
jmp 0x41c7ae
push ecx
lea ecx, [ebp - 0x1ad8]
push ecx
push dword [ebp + 0x10]
push dword [ebp - 0x1acc]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41c7a2
mov eax, dword [ebp - 0x1ad8]
and dword [ebp - 0x1abc], 0
mov dword [ebp - 0x1ac8], eax
jmp 0x41c7ae
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1abc], eax
cmp dword [ebp - 0x1ac8], 0
jne 0x41c823
cmp dword [ebp - 0x1abc], 0
je 0x41c7ed
push 5
pop ebx
cmp dword [ebp - 0x1abc], ebx
jne 0x41c7df
call fcn.00414b17
mov dword [eax], 9
call fcn.00414b2a
mov dword [eax], ebx
jmp 0x41c81e
push dword [ebp - 0x1abc]
call fcn.00414b3d
pop ebx
jmp 0x41c81e
mov eax, dword [ebp - 0x1adc]
mov eax, dword [eax]
test byte [esi + eax + 4], 0x40
je 0x41c80b
mov eax, dword [ebp - 0x1acc]
cmp byte [eax], 0x1a
jne 0x41c80b
xor eax, eax
jmp 0x41c82f
call fcn.00414b17
mov dword [eax], 0x1c
call fcn.00414b2a
and dword [eax], 0
or eax, 0xffffffff
jmp 0x41c82f
mov eax, dword [ebp - 0x1ac8]
sub eax, dword [ebp - 0x1ad0]
pop ebx
pop esi
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00410b60
leave
ret