Function at 0x41fde9
Capabilities:
Write file on windows

Disassembly:
push ebp
mov esi, esi
mov eax, 0x1ae4
mov ebp, esp
call fcn.00414fc0
mov eax, dword [0x42a080]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
push esi
xor esi, esi
mov dword [ebp - 0x1acc], eax
mov dword [ebp - 0x1ac8], esi
mov dword [ebp - 0x1ad0], esi
cmp dword [ebp + 0x10], esi
jne 0x41fe2a
xor eax, eax
jmp 0x4204d8
cmp eax, esi
jne 0x41fe4d
call fcn.0040b4b6
mov dword [eax], esi
call fcn.0040b4a3
mov dword [eax], 0x16
call fcn.0040ad62
or eax, 0xffffffff
jmp 0x4204d8
mov esi, edi
mov eax, edi
sar eax, 5
and esi, 0x1f
shl esi, 6
push ebx
lea ebx, [eax*4 + 0x5ad720]
mov eax, dword [ebx]
mov cl, byte [eax + esi + 0x24]
add cl, cl
sar cl, 1
cmp cl, 2
mov dword [ebp - 0x1adc], ebx
mov byte [ebp - 0x1ac1], cl
je 0x41fe82
cmp cl, 1
jne 0x41fea9
mov ecx, dword [ebp + 0x10]
not ecx
test cl, 1
jne 0x41fea9
call fcn.0040b4b6
and dword [eax], 0
call fcn.0040b4a3
mov dword [eax], 0x16
call fcn.0040ad62
jmp 0x4204c6
test byte [eax + esi + 4], 0x20
je 0x41febf
push 2
push 0
push 0
push edi
call fcn.00420a7b
add esp, 0x10
push edi
call fcn.0042142d
pop ecx
or eax, eax
je 0x420167
mov eax, dword [ebx]
test byte [esi + eax + 4], 0x80
je 0x420167
call fcn.0040a54f
xor ecx, ecx
mov eax, dword [eax + 0x6c]
cmp dword [eax + 0x14], ecx
lea eax, [ebp - 0x1ae0]
sete cl
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 0x420169
cmp edi, ecx
je 0x41ff19
cmp byte [ebp - 0x1ac1], cl
je 0x420169
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 0x42045f
mov dword [ebp - 0x1ac0], eax
mov al, byte [ebp - 0x1ac1]
or al, al
jne 0x4200b7
xor eax, eax
mov cl, byte [edi]
cmp cl, 0xa
sete al
mov ebx, dword [ebp - 0x1adc]
mov dword [ebp - 0x1ae4], eax
mov eax, dword [ebx]
add eax, esi
cmp dword [eax + 0x38], 0
je 0x41ff85
mov dl, byte [eax + 0x34]
mov byte [ebp - 0xc], dl
mov byte [ebp - 0xb], cl
and dword [eax + 0x38], 0
push 2
lea eax, [ebp - 0xc]
push eax
jmp 0x41ffd0
movsx eax, cl
push eax
call fcn.0041609c
test eax, eax
pop ecx
je 0x41ffcd
mov ecx, dword [ebp - 0x1acc]
sub ecx, edi
add ecx, dword [ebp + 0x10]
xor eax, eax
inc eax
cmp ecx, eax
jbe 0x42014e
lea eax, [ebp - 0x1abc]
push 2
push edi
push eax
call fcn.00421621
add esp, 0xc
cmp eax, 0xffffffff
je 0x420456
inc edi
inc dword [ebp - 0x1ac0]
jmp 0x41ffe8
push 1
push edi
lea eax, [ebp - 0x1abc]
push eax
call fcn.00421621
sub esp, 0xfffffff4
cmp eax, 0xffffffff
je 0x420456
lea ecx, [ebp - 0xc]
xor eax, eax
push eax
inc edi
push eax
push 5
push ecx
lea ecx, [ebp - 0x1abc]
push 1
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 0x420456
push 0
lea eax, [ebp - 0x1ad4]
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 0x42044a
mov eax, dword [ebp - 0x1ac0]
mov ecx, dword [ebp - 0x1ad0]
add eax, ecx
mov dword [ebp - 0x1ac8], eax
cmp dword [ebp - 0x1ad4], ebx
jl 0x420456
cmp dword [ebp - 0x1ae4], 0
je 0x42013a
push 0
lea eax, [ebp - 0x1ad4]
push eax
push 1
lea eax, [ebp - 0xc]
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 0x42044a
cmp dword [ebp - 0x1ad4], 1
jl 0x420456
inc dword [ebp - 0x1ad0]
inc dword [ebp - 0x1ac8]
jmp 0x42013a
cmp al, 1
je 0x4200bf
cmp al, 2
jne 0x4200e0
xor ecx, ecx
movzx ebx, word [edi]
cmp ebx, 0xa
sete cl
sub edi, 0xfffffffe
add dword [ebp - 0x1ac0], 2
mov dword [ebp - 0x1abc], ebx
mov dword [ebp - 0x1ae4], ecx
cmp al, 1
je 0x4200e8
cmp al, 2
jne 0x42013a
push dword [ebp - 0x1abc]
call fcn.00421483
pop ecx
cmp ax, word [ebp - 0x1abc]
jne 0x42044a
add dword [ebp - 0x1ac8], 2
cmp dword [ebp - 0x1ae4], 0
je 0x42013a
push 0xd
pop eax
push eax
mov dword [ebp - 0x1abc], eax
call fcn.00421483
cmp ax, word [ebp - 0x1abc]
pop ecx
jne 0x42044a
inc dword [ebp - 0x1ac8]
inc dword [ebp - 0x1ad0]
mov eax, dword [ebp + 0x10]
cmp dword [ebp - 0x1ac0], eax
jb 0x41ff42
jmp 0x420456
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 0x420456
xor ecx, ecx
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x80
je 0x420417
cmp byte [ebp - 0x1ac1], 0
mov dword [ebp - 0x1abc], ecx
jne 0x420231
mov edi, dword [ebp - 0x1acc]
cmp dword [ebp + 0x10], ecx
jbe 0x420495
mov ecx, edi
lea eax, [ebp - 0x1ab8]
xor ebx, ebx
sub ecx, dword [ebp - 0x1acc]
cmp ecx, dword [ebp + 0x10]
jae 0x4201d3
mov dl, byte [edi]
inc edi
mov dword [ebp - 0x1ae0], edi
inc ecx
cmp dl, 0xa
jne 0x4201c7
inc dword [ebp - 0x1ad0]
mov byte [eax], 0xd
inc eax
inc ebx
mov byte [eax], dl
inc eax
inc ebx
cmp ebx, 0x13ff
jb 0x4201a8
push 0
mov ebx, eax
lea eax, [ebp - 0x1ab8]
sub ebx, eax
lea eax, [ebp - 0x1ad8]
push eax
lea eax, [ebp - 0x1ab8]
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 0x42044a
mov eax, dword [ebp - 0x1ad8]
add dword [ebp - 0x1ac8], eax
cmp eax, ebx
jl 0x420456
mov eax, edi
sub eax, dword [ebp - 0x1acc]
cmp eax, dword [ebp + 0x10]
jb 0x420198
jmp 0x420456
cmp byte [ebp - 0x1ac1], 2
jne 0x42030b
mov ebx, dword [ebp - 0x1acc]
cmp dword [ebp + 0x10], ecx
jbe 0x420495
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 0x4202ad
movzx edx, word [ebx]
add ebx, edi
add ecx, edi
cmp edx, 0xa
mov dword [ebp - 0x1ae0], ebx
jne 0x420296
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 0x420265
push 0
mov edi, eax
lea eax, [ebp - 0x1ab8]
sub edi, eax
lea eax, [ebp - 0x1ad8]
push eax
push edi
lea eax, [ebp - 0x1ab8]
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 0x42044a
mov eax, dword [ebp - 0x1ad8]
add dword [ebp - 0x1ac8], eax
cmp eax, edi
jl 0x420456
mov eax, ebx
sub eax, dword [ebp - 0x1acc]
cmp eax, dword [ebp + 0x10]
jb 0x42024d
jmp 0x420456
mov eax, dword [ebp - 0x1acc]
mov dword [ebp - 0x1ad4], eax
cmp dword [ebp + 0x10], ecx
jbe 0x420495
lea eax, [ebp - 0x6b8]
mov ecx, dword [ebp - 0x1ad4]
and dword [ebp - 0x1ac0], 0
sub ecx, dword [ebp - 0x1acc]
push 2
pop edi
cmp ecx, dword [ebp + 0x10]
jae 0x42037c
mov ebx, dword [ebp - 0x1ad4]
movzx ebx, word [ebx]
add dword [ebp - 0x1ad4], edi
add ecx, edi
cmp ebx, 0xa
jne 0x420365
push 0xd
pop edx
mov word [eax], dx
add eax, edi
add dword [ebp - 0x1ac0], edi
add dword [ebp - 0x1ac0], edi
mov word [eax], bx
add eax, edi
cmp dword [ebp - 0x1ac0], 0x6a8
jb 0x42033c
lea ecx, [ebp - 0x6b8]
lea edx, [ebp - 0x1410]
xor edi, edi
push edi
sub eax, ecx
push edi
push 0xd55
push edx
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 0x42044a
push 0
lea eax, [ebp - 0x1ad8]
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]
or eax, eax
je 0x4203ea
add edi, dword [ebp - 0x1ad8]
cmp ebx, edi
jg 0x4203b3
jmp 0x4203f6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1abc], eax
cmp ebx, edi
jg 0x420456
mov eax, dword [ebp - 0x1ad4]
sub eax, dword [ebp - 0x1acc]
mov dword [ebp - 0x1ac8], eax
cmp eax, dword [ebp + 0x10]
jb 0x420320
jmp 0x420456
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]
or eax, eax
je 0x42044a
mov eax, dword [ebp - 0x1ad8]
and dword [ebp - 0x1abc], 0
mov dword [ebp - 0x1ac8], eax
jmp 0x420456
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1abc], eax
cmp dword [ebp - 0x1ac8], 0
jne 0x4204cb
cmp dword [ebp - 0x1abc], 0
je 0x420495
push 5
pop ebx
cmp dword [ebp - 0x1abc], ebx
jne 0x420487
call fcn.0040b4a3
mov dword [eax], 9
call fcn.0040b4b6
mov dword [eax], ebx
jmp 0x4204c6
push dword [ebp - 0x1abc]
call fcn.0040b4c9
pop ebx
jmp 0x4204c6
mov eax, dword [ebp - 0x1adc]
mov eax, dword [eax]
test byte [esi + eax + 4], 0x40
je 0x4204b3
mov eax, dword [ebp - 0x1acc]
cmp byte [eax], 0x1a
jne 0x4204b3
xor eax, eax
jmp 0x4204d7
call fcn.0040b4a3
mov dword [eax], 0x1c
call fcn.0040b4b6
and dword [eax], 0
or eax, 0xffffffff
jmp 0x4204d7
mov eax, dword [ebp - 0x1ac8]
sub eax, dword [ebp - 0x1ad0]
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop edi
call fcn.00408076
leave
ret