Function at 0x78abeb64
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x1ae4
call fcn.78ab60b0
mov eax, dword [0x78b54610]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
mov dword [ebp - 0x1acc], eax
mov dword [ebp - 0x1ac8], edi
mov dword [ebp - 0x1ad0], edi
cmp dword [ebp + 0x10], edi
je 0x78adfd86
cmp eax, edi
je 0x78adfd8d
mov eax, esi
sar eax, 5
mov edi, esi
push ebx
lea ebx, [eax*4 + sym.MSVCR100.dll___pioinfo]
mov eax, dword [ebx]
and edi, 0x1f
shl edi, 6
mov cl, byte [eax + edi + 0x24]
add cl, cl
sar cl, 1
mov dword [ebp - 0x1adc], ebx
mov byte [ebp - 0x1ac1], cl
cmp cl, 2
je 0x78adfdac
cmp cl, 1
je 0x78adfdac
test byte [eax + edi + 4], 0x20
jne 0x78adfdd7
push esi
call sym.MSVCR100.dll__isatty
pop ecx
test eax, eax
jne 0x78adfdeb
xor ecx, ecx
mov eax, dword [ebx]
test byte [edi + eax + 4], 0x80
jne 0x78abf048
push ecx
lea ecx, [ebp - 0x1ad8]
push ecx
push dword [ebp + 0x10]
push dword [ebp - 0x1acc]
push dword [eax + edi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x78abf105
mov eax, dword [ebp - 0x1ad8]
and dword [ebp - 0x1abc], 0
mov dword [ebp - 0x1ac8], eax
cmp dword [ebp - 0x1ac8], 0
je 0x78ae027c
mov eax, dword [ebp - 0x1ac8]
sub eax, dword [ebp - 0x1ad0]
pop ebx
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.78ab0807
leave
ret
cmp byte [ebp - 0x1ac1], 0
mov dword [ebp - 0x1abc], ecx
jne 0x78ae0084
mov ebx, dword [ebp - 0x1acc]
cmp dword [ebp + 0x10], ecx
ja 0x78abf0e0
jmp 0x78ae02b2
cmp ecx, dword [ebp + 0x10]
jae 0x78abf08b
mov dl, byte [ebx]
inc ebx
inc ecx
mov dword [ebp - 0x1ae0], ebx
cmp dl, 0xa
je 0x78abf0f5
mov byte [eax], dl
inc eax
inc esi
cmp esi, 0x13ff
jb 0x78abf06b
mov esi, eax
lea eax, [ebp - 0x1ab8]
sub esi, eax
push 0
lea eax, [ebp - 0x1ad8]
push eax
push esi
lea eax, [ebp - 0x1ab8]
push eax
mov eax, dword [ebp - 0x1adc]
mov eax, dword [eax]
push dword [eax + edi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x78abf105
mov eax, dword [ebp - 0x1ad8]
add dword [ebp - 0x1ac8], eax
cmp eax, esi
jl 0x78abec45
mov eax, ebx
sub eax, dword [ebp - 0x1acc]
cmp eax, dword [ebp + 0x10]
jae 0x78abec45
mov ecx, ebx
xor esi, esi
sub ecx, dword [ebp - 0x1acc]
lea eax, [ebp - 0x1ab8]
jmp 0x78abf06b
inc dword [ebp - 0x1ad0]
mov byte [eax], 0xd
inc eax
inc esi
jmp 0x78abf07f
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x78ae0271
xor eax, eax
jmp 0x78abec5f
call sym.MSVCR100.dll___doserrno
mov dword [eax], edi
call sym.MSVCR100.dll__errno
mov dword [eax], 0x16
call sym.MSVCR100.dll__invalid_parameter_noinfo
or eax, 0xffffffff
jmp 0x78abec5f
mov ecx, dword [ebp + 0x10]
not ecx
test cl, 1
jne 0x78abebe7
call sym.MSVCR100.dll___doserrno
and dword [eax], 0
call sym.MSVCR100.dll__errno
mov dword [eax], 0x16
call sym.MSVCR100.dll__invalid_parameter_noinfo
jmp 0x78ae02e6
push 2
push 0
push 0
push esi
call fcn.78b285a6
add esp, 0x10
jmp 0x78abebf2
mov eax, dword [ebx]
test byte [edi + eax + 4], 0x80
je 0x78abec01
call sym.MSVCR100.dll__getptd
mov eax, dword [eax + 0x6c]
xor ecx, ecx
cmp dword [eax + 0x14], ecx
lea eax, [ebp - 0x1ae0]
sete cl
push eax
mov eax, dword [ebx]
push dword [eax + edi]
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
xor ecx, ecx
cmp eax, ecx
je 0x78abec03
cmp esi, ecx
je 0x78adfe36
cmp byte [ebp - 0x1ac1], cl
je 0x78abec03
call dword [sym.imp.KERNEL32.dll_GetConsoleCP]
mov ebx, dword [ebp - 0x1acc]
mov dword [ebp - 0x1ae0], eax
xor eax, eax
mov dword [ebp - 0x1ad4], eax
cmp dword [ebp + 0x10], eax
jbe 0x78ae027c
mov dword [ebp - 0x1ac0], eax
mov al, byte [ebp - 0x1ac1]
test al, al
jne 0x78adffd4
mov cl, byte [ebx]
mov esi, dword [ebp - 0x1adc]
xor eax, eax
cmp cl, 0xa
sete al
mov dword [ebp - 0x1ae4], eax
mov eax, dword [esi]
add eax, edi
cmp dword [eax + 0x38], 0
je 0x78adfea2
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 0x78adfeed
movsx eax, cl
push eax
call sym.MSVCR100.dll_isleadbyte
pop ecx
test eax, eax
je 0x78adfeea
mov ecx, dword [ebp - 0x1acc]
sub ecx, ebx
add ecx, dword [ebp + 0x10]
xor eax, eax
inc eax
cmp ecx, eax
jbe 0x78ae006b
push 2
lea eax, [ebp - 0x1abc]
push ebx
push eax
call sym.MSVCR100.dll_mbtowc
add esp, 0xc
cmp eax, 0xffffffff
je 0x78abec45
inc ebx
inc dword [ebp - 0x1ac0]
jmp 0x78adff05
push 1
push ebx
lea eax, [ebp - 0x1abc]
push eax
call sym.MSVCR100.dll_mbtowc
add esp, 0xc
cmp eax, 0xffffffff
je 0x78abec45
xor eax, eax
push eax
push eax
push 5
lea ecx, [ebp - 0xc]
push ecx
push 1
lea ecx, [ebp - 0x1abc]
push ecx
push eax
push dword [ebp - 0x1ae0]
inc ebx
inc dword [ebp - 0x1ac0]
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov esi, eax
test esi, esi
je 0x78abec45
push 0
lea eax, [ebp - 0x1ad4]
push eax
push esi
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x1adc]
mov eax, dword [eax]
push dword [eax + edi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x78abf105
mov eax, dword [ebp - 0x1ac0]
mov ecx, dword [ebp - 0x1ad0]
add eax, ecx
mov dword [ebp - 0x1ac8], eax
cmp dword [ebp - 0x1ad4], esi
jl 0x78abec45
cmp dword [ebp - 0x1ae4], 0
je 0x78ae0057
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 [eax + edi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x78abf105
invalid