Function at 0x76b3e561
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x1af0
call fcn.76b59720
mov eax, dword [0x76baa330]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 0x10]
xor ebx, ebx
mov dword [ebp - 0x1ad8], ecx
mov dword [ebp - 0x1abc], eax
mov dword [ebp - 0x1adc], ebx
push edi
mov edi, ebx
test esi, esi
je 0x76b3ed8e
test eax, eax
jne 0x76b3e5cf
call sym.msvcrt.dll___doserrno
mov dword [eax], ebx
call sym.msvcrt.dll__errno
push ebx
push ebx
push ebx
push ebx
push ebx
mov dword [eax], 0x16
call sym.msvcrt.dll__invalid_parameter
add esp, 0x14
or eax, 0xffffffff
jmp 0x76b3ed90
mov eax, ecx
mov edx, ecx
sar edx, 5
and eax, 0x1f
imul eax, eax, 0x24
mov dword [ebp - 0x1ae0], edx
mov edx, dword [edx*4 + sym.msvcrt.dll___pioinfo]
mov dword [ebp - 0x1ad4], eax
mov ebx, dword [eax + edx + 8]
and ebx, 3
cmp ebx, 2
je 0x76b3e600
cmp ebx, 1
jne 0x76b3e617
mov eax, esi
not eax
test al, 1
jne 0x76b3e611
call sym.msvcrt.dll___doserrno
xor ebx, ebx
jmp 0x76b3e5ad
mov eax, dword [ebp - 0x1ad4]
test byte [eax + edx + 4], 0x20
je 0x76b3e633
push 2
push 0
push 0
push ecx
call fcn.76b3bf3b
mov ecx, dword [ebp - 0x1ad8]
add esp, 0x10
push ecx
call sym.msvcrt.dll__isatty
pop ecx
mov ecx, dword [ebp - 0x1ad4]
test eax, eax
je 0x76b3e927
mov eax, dword [ebp - 0x1ae0]
mov eax, dword [eax*4 + sym.msvcrt.dll___pioinfo]
cmp byte [ecx + eax + 4], 0
jge 0x76b3e927
call fcn.76b58023
mov ecx, dword [ebp - 0x1ad4]
mov eax, dword [eax + 0x6c]
mov eax, dword [eax + 0x14]
mov dword [ebp - 0x1ad8], eax
lea eax, [ebp - 0x1aec]
push eax
mov eax, dword [ebp - 0x1ae0]
mov eax, dword [eax*4 + sym.msvcrt.dll___pioinfo]
push dword [ecx + eax]
call dword [sym.imp.api_ms_win_core_console_l1_1_0.dll_GetConsoleMode]
test eax, eax
je 0x76b3e921
cmp dword [ebp - 0x1ad8], edi
jne 0x76b3e6ac
test ebx, ebx
je 0x76b3e921
call dword [sym.imp.api_ms_win_core_console_l1_1_0.dll_GetConsoleCP]
mov edx, dword [ebp - 0x1abc]
mov ecx, edx
and dword [ebp - 0x1ac0], edi
mov dword [ebp - 0x1af0], eax
mov dword [ebp - 0x1acc], ecx
test esi, esi
je 0x76b3e916
xor eax, eax
mov dword [ebp - 0x1ae4], 0xa
mov dword [ebp - 0x1ac4], eax
test ebx, ebx
jne 0x76b3e860
mov cl, byte [ecx]
xor eax, eax
cmp cl, 0xa
mov byte [ebp - 0x1ac5], cl
sete al
mov dword [ebp - 0x1ad8], eax
movsx eax, cl
push eax
call sym.msvcrt.dll_isleadbyte
pop ecx
mov ecx, dword [ebp - 0x1acc]
test eax, eax
jne 0x76b3e741
push 1
push ecx
lea eax, [ebp - 0x1ad0]
push eax
call sym.msvcrt.dll_mbtowc
add esp, 0xc
cmp eax, 0xffffffff
je 0x76b3e8fe
mov eax, dword [ebp - 0x1acc]
mov ecx, dword [ebp - 0x1ac4]
jmp 0x76b3e77d
mov eax, dword [ebp - 0x1abc]
sub eax, ecx
add eax, esi
cmp eax, 1
jbe 0x76b3e8fe
push 2
push ecx
lea eax, [ebp - 0x1ad0]
push eax
call sym.msvcrt.dll_mbtowc
add esp, 0xc
cmp eax, 0xffffffff
je 0x76b3e8fe
mov eax, dword [ebp - 0x1acc]
mov ecx, dword [ebp - 0x1ac4]
inc eax
inc ecx
inc eax
inc ecx
mov dword [ebp - 0x1ac4], ecx
xor ecx, ecx
push ecx
push ecx
push 5
mov dword [ebp - 0x1acc], eax
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 0x1ad0]
push eax
push ecx
push dword [ebp - 0x1af0]
call dword [sym.imp.api_ms_win_core_string_l1_1_0.dll_WideCharToMultiByte]
mov dword [ebp - 0x1aec], eax
test eax, eax
je 0x76b3e8fe
push 0
lea ecx, [ebp - 0x1ac0]
push ecx
mov ecx, dword [ebp - 0x1ad4]
push eax
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x1ae0]
mov eax, dword [eax*4 + sym.msvcrt.dll___pioinfo]
push dword [ecx + eax]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
test eax, eax
je 0x76b3e909
add edi, dword [ebp - 0x1ac0]
mov eax, dword [ebp - 0x1aec]
cmp dword [ebp - 0x1ac0], eax
jl 0x76b3e8fe
cmp byte [ebp - 0x1ac5], 0xa
jne 0x76b3e8ea
mov ecx, dword [ebp - 0x1ad4]
lea eax, [ebp - 0x1ac0]
push 0
push eax
push 1
lea eax, [ebp - 0xc]
mov byte [ebp - 0xc], 0xd
push eax
mov eax, dword [ebp - 0x1ae0]
mov eax, dword [eax*4 + sym.msvcrt.dll___pioinfo]
push dword [ecx + eax]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
test eax, eax
je 0x76b3e909
cmp dword [ebp - 0x1ac0], 1
jl 0x76b3e8fe
inc dword [ebp - 0x1adc]
inc edi
jmp 0x76b3e8ea
cmp ebx, 1
je 0x76b3e86a
cmp ebx, 2
jne 0x76b3e89e
movzx eax, word [ecx]
xor edx, edx
cmp ax, word [ebp - 0x1ae4]
mov word [ebp - 0x1ad0], ax
mov eax, dword [ebp - 0x1ac4]
sete dl
add ecx, 2
mov dword [ebp - 0x1ad8], edx
add eax, 2
mov dword [ebp - 0x1acc], ecx
mov dword [ebp - 0x1ac4], eax
cmp ebx, 1
je 0x76b3e8a8
cmp ebx, 2
jne 0x76b3e8f6
push dword [ebp - 0x1ad0]
call fcn.76b3998a
pop ecx
cmp ax, word [ebp - 0x1ad0]
jne 0x76b3e909
add edi, 2
cmp dword [ebp - 0x1ad8], 0
je 0x76b3e8ea
push 0xd
pop eax
push eax
mov word [ebp - 0x1ad0], ax
call fcn.76b3998a
pop ecx
cmp ax, word [ebp - 0x1ad0]
jne 0x76b3e909
inc edi
inc dword [ebp - 0x1adc]
mov eax, dword [ebp - 0x1ac4]
mov ecx, dword [ebp - 0x1acc]
cmp eax, esi
jb 0x76b3e6e6
mov esi, dword [ebp - 0x1ad8]
jmp 0x76b3ed07
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov esi, eax
jmp 0x76b3ed07
mov esi, dword [ebp - 0x1ad8]
jmp 0x76b3ed29
mov ecx, dword [ebp - 0x1ad4]
mov eax, dword [ebp - 0x1ae0]
mov eax, dword [eax*4 + sym.msvcrt.dll___pioinfo]
cmp byte [ecx + eax + 4], 0
jge 0x76b3ece2
mov edx, dword [ebp - 0x1abc]
xor esi, esi
mov dword [ebp - 0x1ad0], esi
test ebx, ebx
jne 0x76b3ea2e
mov dword [ebp - 0x1ae4], edx
cmp dword [ebp + 0x10], esi
jbe 0x76b3ed57
xor ecx, ecx
lea ebx, [ebp - 0x1ab8]
mov eax, edx
mov dword [ebp - 0x1ad8], ecx
sub eax, dword [ebp - 0x1abc]
cmp eax, dword [ebp + 0x10]
jae 0x76b3e9c3
mov cl, byte [edx]
inc edx
inc eax
mov byte [ebp - 0x1ac5], cl
cmp cl, 0xa
mov dword [ebp - 0x1ae4], edx
mov ecx, dword [ebp - 0x1ad8]
jne 0x76b3e9a5
inc dword [ebp - 0x1adc]
mov byte [ebx], 0xd
inc ebx
inc ecx
mov dl, byte [ebp - 0x1ac5]
mov byte [ebx], dl
inc ebx
mov edx, dword [ebp - 0x1ae4]
inc ecx
mov dword [ebp - 0x1ad8], ecx
cmp ecx, 0x13ff
jb 0x76b3e97a
mov ecx, dword [ebp - 0x1ad4]
lea eax, [ebp - 0x1ab8]
sub ebx, eax
lea eax, [ebp - 0x1ae8]
push 0
push eax
push ebx
lea eax, [ebp - 0x1ab8]
push eax
mov eax, dword [ebp - 0x1ae0]
mov eax, dword [eax*4 + sym.msvcrt.dll___pioinfo]
push dword [ecx + eax]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
test eax, eax
je 0x76b3e909
add edi, dword [ebp - 0x1ae8]
cmp dword [ebp - 0x1ae8], ebx
jl 0x76b3ed07
mov edx, dword [ebp - 0x1ae4]
mov eax, edx
sub eax, dword [ebp - 0x1abc]
cmp eax, dword [ebp + 0x10]
jb 0x76b3e964
jmp 0x76b3ed07
cmp ebx, 2
jne 0x76b3eb5e
mov eax, edx
mov dword [ebp - 0x1ac0], eax
cmp dword [ebp + 0x10], esi
jbe 0x76b3ed57
mov dword [ebp - 0x1ae4], 0xa
mov dword [ebp - 0x1ac4], eax
lea ebx, [ebp - 0x1ab8]
xor ecx, ecx
sub dword [ebp - 0x1ac4], edx
mov edx, dword [ebp - 0x1ac4]
mov dword [ebp - 0x1af0], eax
cmp edx, dword [ebp + 0x10]
jae 0x76b3eae7
movzx esi, word [eax]
add edx, 2
add eax, 2
mov dword [ebp - 0x1aec], esi
cmp si, word [ebp - 0x1ae4]
mov esi, dword [ebp - 0x1ad0]
mov dword [ebp - 0x1ac0], eax
jne 0x76b3eabc
cmp ecx, 0x13fc
ja 0x76b3eadb
add dword [ebp - 0x1adc], 2
push 0xd
pop eax
mov word [ebx], ax
add ebx, 2
mov eax, dword [ebp - 0x1ac0]
add ecx, 2
mov esi, dword [ebp - 0x1aec]
add ecx, 2
mov word [ebx], si
add ebx, 2
mov esi, dword [ebp - 0x1ad0]
cmp ecx, 0x13fe
jb 0x76b3ea6c
jmp 0x76b3eae7
mov eax, dword [ebp - 0x1af0]
mov dword [ebp - 0x1ac0], eax
mov ecx, dword [ebp - 0x1ad4]
lea eax, [ebp - 0x1ab8]
sub ebx, eax
lea eax, [ebp - 0x1ae8]
push 0
push eax
push ebx
lea eax, [ebp - 0x1ab8]
push eax
mov eax, dword [ebp - 0x1ae0]
mov eax, dword [eax*4 + sym.msvcrt.dll___pioinfo]
push dword [ecx + eax]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
test eax, eax
je 0x76b3e909
mov eax, dword [ebp - 0x1ae8]
add edi, eax
cmp eax, ebx
jl 0x76b3ed07
test eax, eax
je 0x76b3ed07
mov eax, dword [ebp - 0x1ac0]
mov edx, dword [ebp - 0x1abc]
sub eax, edx
cmp eax, dword [ebp + 0x10]
mov eax, dword [ebp - 0x1ac0]
jb 0x76b3ea52
jmp 0x76b3ed0d
mov ebx, dword [ebp + 0x10]
mov ecx, edx
mov dword [ebp - 0x1ac4], ecx
test ebx, ebx
je 0x76b3ed57
mov dword [ebp - 0x1ae4], 0xa
and dword [ebp - 0x1aec], 0
lea eax, [ebp - 0x6b8]
mov dword [ebp - 0x1ac0], ecx
sub dword [ebp - 0x1ac0], edx
mov edx, dword [ebp - 0x1aec]
mov dword [ebp - 0x1af0], ecx
cmp dword [ebp - 0x1ac0], ebx
jae 0x76b3ec15
movzx esi, word [ecx]
add ecx, 2
add dword [ebp - 0x1ac0], 2
cmp si, word [ebp - 0x1ae4]
mov dword [ebp - 0x1aec], esi
mov esi, dword [ebp - 0x1ad0]
mov dword [ebp - 0x1ac4], ecx
jne 0x76b3ebea
cmp edx, 0x6a6
ja 0x76b3ec09
push 0xd
pop ecx
mov word [eax], cx
add eax, 2
mov ecx, dword [ebp - 0x1ac4]
add edx, 2
mov esi, dword [ebp - 0x1aec]
add edx, 2
mov word [eax], si
add eax, 2
mov esi, dword [ebp - 0x1ad0]
cmp edx, 0x6a8
jb 0x76b3eb9a
jmp 0x76b3ec15
mov ecx, dword [ebp - 0x1af0]
mov dword [ebp - 0x1ac4], ecx
push 0
push 0
push 0xd55
lea ecx, [ebp - 0x1410]
push ecx
lea ecx, [ebp - 0x6b8]
sub eax, ecx
cdq
sub eax, edx
sar eax, 1
push eax
mov eax, ecx
push eax
push 0
push 0xfde9
call dword [sym.imp.api_ms_win_core_string_l1_1_0.dll_WideCharToMultiByte]
mov dword [ebp - 0x1acc], eax
test eax, eax
je 0x76b3e909
xor ecx, ecx
mov dword [ebp - 0x1ac0], ecx
push 0
sub eax, ecx
lea edx, [ebp - 0x1ae8]
push edx
push eax
lea eax, [ebp - 0x1410]
add eax, ecx
mov ecx, dword [ebp - 0x1ad4]
push eax
mov eax, dword [ebp - 0x1ae0]
mov eax, dword [eax*4 + sym.msvcrt.dll___pioinfo]
push dword [ecx + eax]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
test eax, eax
je 0x76b3ecac
mov ecx, dword [ebp - 0x1ac0]
add ecx, dword [ebp - 0x1ae8]
mov eax, dword [ebp - 0x1acc]
mov dword [ebp - 0x1ac0], ecx
cmp eax, ecx
jg 0x76b3ec59
jmp 0x76b3ecc8
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov esi, eax
mov eax, dword [ebp - 0x1acc]
mov dword [ebp - 0x1ad0], esi
cmp eax, dword [ebp - 0x1ac0]
jg 0x76b3ed07
mov ecx, dword [ebp - 0x1ac4]
mov edi, ecx
mov edx, dword [ebp - 0x1abc]
sub edi, edx
cmp edi, ebx
jb 0x76b3eb7b
jmp 0x76b3ed0d
push 0
lea edx, [ebp - 0x1ae8]
push edx
push esi
push dword [ebp - 0x1abc]
push dword [ecx + eax]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
test eax, eax
je 0x76b3ed1b
mov edi, dword [ebp - 0x1ae8]
xor esi, esi
mov edx, dword [ebp - 0x1abc]
test edi, edi
je 0x76b3ed29
sub edi, dword [ebp - 0x1adc]
mov eax, edi
jmp 0x76b3ed90
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edx, dword [ebp - 0x1abc]
mov esi, eax
test esi, esi
je 0x76b3ed57
push 5
pop ebx
cmp esi, ebx
jne 0x76b3ed4b
call sym.msvcrt.dll__errno
mov dword [eax], 9
call sym.msvcrt.dll___doserrno
mov dword [eax], ebx
jmp 0x76b3e5c7
push esi
call fcn.76b262a9
pop ecx
jmp 0x76b3e5c7
mov eax, dword [ebp - 0x1ae0]
mov ebx, dword [ebp - 0x1ad4]
mov eax, dword [eax*4 + sym.msvcrt.dll___pioinfo]
test byte [ebx + eax + 4], 0x40
je 0x76b3ed76
cmp byte [edx], 0x1a
je 0x76b3ed8e
call sym.msvcrt.dll__errno
mov dword [eax], 0x1c
call sym.msvcrt.dll___doserrno
and dword [eax], 0
jmp 0x76b3e5c7
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.76b4dc60
leave
ret