Function at 0x76b3d03e
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
push 0xfffffffffffffffe
pop ecx
xor edi, edi
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x30], esi
cmp eax, ecx
jne 0x76b3d078
call sym.msvcrt.dll___doserrno
mov dword [eax], edi
call sym.msvcrt.dll__errno
mov dword [eax], 9
jmp 0x76b3d80b
test eax, eax
js 0x76b3d7ec
cmp eax, dword [0x76babb64]
jae 0x76b3d7ec
mov ecx, eax
and eax, 0x1f
shr ecx, 5
imul ebx, eax, 0x24
mov dword [ebp - 0x10], ecx
mov edx, dword [ecx*4 + sym.msvcrt.dll___pioinfo]
mov al, byte [ebx + edx + 4]
test al, 1
je 0x76b3d7ec
cmp esi, 0x7fffffff
jbe 0x76b3d0cc
call sym.msvcrt.dll___doserrno
mov dword [eax], edi
call sym.msvcrt.dll__errno
mov dword [eax], 0x16
jmp 0x76b3d7fe
test esi, esi
je 0x76b3d7e8
test al, 2
jne 0x76b3d7e8
cmp dword [ebp + 0xc], edi
jne 0x76b3d0ff
call sym.msvcrt.dll___doserrno
xor ebx, ebx
mov dword [eax], ebx
call sym.msvcrt.dll__errno
push ebx
push ebx
push ebx
push ebx
mov dword [eax], 0x16
push ebx
jmp 0x76b3d803
mov eax, dword [ebx + edx + 8]
and eax, 3
mov dword [ebp - 0x28], eax
sub eax, 1
je 0x76b3d126
sub eax, 1
jne 0x76b3d11e
mov eax, esi
not eax
test al, 1
je 0x76b3d0e1
and esi, 0xfffffffe
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
jmp 0x76b3d164
mov eax, esi
not eax
test al, 1
je 0x76b3d0e1
shr esi, 1
cmp esi, 4
jae 0x76b3d138
push 4
pop esi
push esi
call fcn.76b38776
mov dword [ebp - 0xc], eax
pop ecx
test eax, eax
jne 0x76b3d161
call sym.msvcrt.dll__errno
mov dword [eax], 0xc
call sym.msvcrt.dll___doserrno
mov dword [eax], 8
jmp 0x76b3d80b
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx*4 + sym.msvcrt.dll___pioinfo]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x14], 0xa
test byte [edx + ebx + 4], 0x48
je 0x76b3d205
mov dl, byte [edx + ebx + 5]
cmp dl, 0xa
je 0x76b3d205
test esi, esi
je 0x76b3d205
mov byte [eax], dl
xor edi, edi
lea edx, [eax + 1]
inc edi
mov eax, dword [ecx*4 + sym.msvcrt.dll___pioinfo]
dec esi
cmp dword [ebp - 0x28], 0
mov dword [ebp - 0x1c], edx
mov byte [eax + ebx + 5], 0xa
je 0x76b3d205
mov eax, dword [ecx*4 + sym.msvcrt.dll___pioinfo]
mov al, byte [eax + ebx + 6]
cmp al, 0xa
je 0x76b3d205
test esi, esi
je 0x76b3d205
mov byte [edx], al
inc edx
mov eax, dword [ecx*4 + sym.msvcrt.dll___pioinfo]
dec esi
cmp dword [ebp - 0x28], 1
push 2
mov dword [ebp - 0x1c], edx
pop edi
mov byte [eax + ebx + 6], 0xa
jne 0x76b3d205
mov eax, dword [ecx*4 + sym.msvcrt.dll___pioinfo]
mov al, byte [eax + ebx + 7]
cmp al, 0xa
je 0x76b3d205
test esi, esi
je 0x76b3d205
mov byte [edx], al
inc edx
mov eax, dword [ecx*4 + sym.msvcrt.dll___pioinfo]
dec esi
mov ecx, dword [ebp - 0x14]
push 3
mov dword [ebp - 0x1c], edx
pop edi
mov byte [eax + ebx + 7], cl
push dword [ebp + 8]
call sym.msvcrt.dll__isatty
test eax, eax
mov eax, dword [ebp - 0x10]
pop ecx
je 0x76b3d286
mov ecx, dword [eax*4 + sym.msvcrt.dll___pioinfo]
cmp byte [ecx + ebx + 4], 0
jge 0x76b3d286
lea eax, [ebp - 0x34]
push eax
push dword [ecx + ebx]
call dword [sym.imp.api_ms_win_core_console_l1_1_0.dll_GetConsoleMode]
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x76b3d283
cmp dword [ebp - 0x28], 2
jne 0x76b3d283
push 0
lea eax, [ebp - 0x20]
shr esi, 1
push eax
mov eax, dword [ebp - 0x10]
push esi
push dword [ebp - 0x1c]
mov eax, dword [eax*4 + sym.msvcrt.dll___pioinfo]
push dword [eax + ebx]
call dword [sym.imp.api_ms_win_core_console_l1_1_0.dll_ReadConsoleW]
test eax, eax
jne 0x76b3d278
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
push eax
call fcn.76b262a9
pop ecx
or ebx, 0xffffffff
mov ecx, dword [ebp - 0xc]
jmp 0x76b3d525
mov eax, dword [ebp - 0x20]
lea ecx, [eax + eax]
mov dword [ebp - 0x20], ecx
jmp 0x76b3d2bb
mov eax, dword [ebp - 0x10]
mov eax, dword [eax*4 + sym.msvcrt.dll___pioinfo]
lea ecx, [ebp - 0x20]
push 0
push ecx
push esi
push dword [ebp - 0x1c]
push dword [eax + ebx]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_ReadFile]
test eax, eax
je 0x76b3d7b4
mov ecx, dword [ebp - 0x20]
test ecx, ecx
js 0x76b3d7b4
cmp ecx, esi
ja 0x76b3d7b4
mov edx, dword [ebp - 0x10]
add edi, ecx
mov esi, dword [edx*4 + sym.msvcrt.dll___pioinfo]
mov al, byte [esi + ebx + 4]
test al, al
jns 0x76b3d51f
cmp dword [ebp - 0x28], 2
je 0x76b3d53f
test ecx, ecx
mov ecx, dword [ebp - 0xc]
je 0x76b3d2ed
cmp byte [ecx], 0xa
jne 0x76b3d2ed
or al, 4
jmp 0x76b3d2ef
and al, 0xfb
mov byte [esi + ebx + 4], al
add edi, ecx
mov dword [ebp - 0x2c], edi
mov eax, ecx
mov dword [ebp - 0x18], eax
mov esi, ecx
cmp ecx, edi
jae 0x76b3d422
mov dword [ebp - 0x1c], 0xd
mov ah, byte [eax]
cmp ah, 0x1a
je 0x76b3d408
mov edi, dword [ebp - 0x18]
inc edi
cmp ah, 0xd
je 0x76b3d32f
mov byte [esi], ah
mov eax, edi
inc esi
mov dword [ebp - 0x18], eax
jmp 0x76b3d3fd
mov eax, dword [ebp - 0x2c]
dec eax
cmp dword [ebp - 0x18], eax
jae 0x76b3d35b
mov cl, byte [edi]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 0x18], eax
cmp cl, byte [ebp - 0x14]
sete al
dec al
and al, 3
add al, byte [ebp - 0x14]
mov byte [esi], al
inc esi
jmp 0x76b3d3f4
push 0
lea eax, [ebp - 0x20]
mov dword [ebp - 0x18], edi
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edx*4 + sym.msvcrt.dll___pioinfo]
push dword [eax + ebx]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_ReadFile]
test eax, eax
jne 0x76b3d388
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
test eax, eax
jne 0x76b3d3ee
cmp dword [ebp - 0x20], 0
je 0x76b3d3ee
mov edx, dword [ebp - 0x10]
mov eax, dword [edx*4 + sym.msvcrt.dll___pioinfo]
test byte [eax + ebx + 4], 0x48
je 0x76b3d3c1
mov eax, dword [ebp - 0x14]
cmp byte [ebp - 1], al
jne 0x76b3d3ab
mov byte [esi], al
jmp 0x76b3d3be
mov eax, dword [ebp - 0x1c]
mov byte [esi], al
mov ecx, dword [edx*4 + sym.msvcrt.dll___pioinfo]
mov al, byte [ebp - 1]
mov byte [ecx + ebx + 5], al
inc esi
jmp 0x76b3d3f7
mov ecx, dword [ebp - 0xc]
cmp esi, ecx
jne 0x76b3d3d5
mov eax, dword [ebp - 0x14]
cmp byte [ebp - 1], al
jne 0x76b3d3d5
mov byte [esi], al
inc esi
jmp 0x76b3d3fa
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.76b3bf3b
mov eax, dword [ebp - 0x14]
add esp, 0x10
cmp byte [ebp - 1], al
je 0x76b3d3f4
mov eax, dword [ebp - 0x1c]
mov byte [esi], al
inc esi
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x2c]
jb 0x76b3d30e
jmp 0x76b3d422
mov edx, dword [edx*4 + sym.msvcrt.dll___pioinfo]
mov al, byte [edx + ebx + 4]
test al, 0x40
jne 0x76b3d41f
or al, 2
mov byte [edx + ebx + 4], al
jmp 0x76b3d422
mov byte [esi], ah
inc esi
mov edi, esi
mov edx, esi
sub edi, ecx
cmp dword [ebp - 0x28], 1
jne 0x76b3d522
test edi, edi
je 0x76b3d522
dec esi
mov al, byte [esi]
test al, al
js 0x76b3d448
mov esi, edx
jmp 0x76b3d4ed
xor edx, edx
movzx eax, al
inc edx
jmp 0x76b3d45e
cmp edx, 4
jg 0x76b3d467
cmp esi, ecx
jb 0x76b3d467
dec esi
inc edx
movzx eax, byte [esi]
cmp byte [eax + 0x76af4c48], 0
je 0x76b3d450
movzx eax, byte [esi]
movsx eax, byte [eax + 0x76af4c48]
test eax, eax
jne 0x76b3d485
call sym.msvcrt.dll__errno
mov dword [eax], 0x2a
jmp 0x76b3d26d
inc eax
cmp eax, edx
jne 0x76b3d48e
add esi, edx
jmp 0x76b3d4ed
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax*4 + sym.msvcrt.dll___pioinfo]
test byte [ecx + ebx + 4], 0x48
je 0x76b3d4d6
mov al, byte [esi]
inc esi
mov byte [ecx + ebx + 5], al
mov eax, dword [ebp - 0x10]
cmp edx, 2
jl 0x76b3d4bf
mov ecx, dword [eax*4 + sym.msvcrt.dll___pioinfo]
mov al, byte [esi]
inc esi
mov byte [ecx + ebx + 6], al
mov eax, dword [ebp - 0x10]
cmp edx, 3
jne 0x76b3d4d2
mov ecx, dword [eax*4 + sym.msvcrt.dll___pioinfo]
mov al, byte [esi]
inc esi
mov byte [ecx + ebx + 7], al
sub esi, edx
jmp 0x76b3d4ea
neg edx
mov eax, edx
push 1
cdq
push edx
push eax
push dword [ebp + 8]
call fcn.76b3bf3b
add esp, 0x10
mov ecx, dword [ebp - 0xc]
mov edi, esi
mov esi, dword [ebp - 0x30]
mov eax, esi
sub edi, ecx
shr eax, 1
push eax
push dword [ebp + 0xc]
push edi
push ecx
push 0
push 0xfde9
call dword [sym.imp.api_ms_win_core_string_l1_1_0.dll_MultiByteToWideChar]
test eax, eax
je 0x76b3d260
add eax, eax
cmp eax, esi
ja 0x76b3d260
mov edi, eax
mov ecx, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x24]
cmp ecx, dword [ebp + 0xc]
je 0x76b3d531
push ecx
call sym.msvcrt.dll_free
pop ecx
cmp ebx, 0xfffffffe
je 0x76b3d538
mov edi, ebx
mov eax, edi
jmp 0x76b3d80e
cmp dword [ebp - 0x2c], 0
je 0x76b3d5f4
mov ecx, dword [ebp - 0xc]
mov eax, edi
cdq
mov esi, ecx
sub eax, edx
sar eax, 1
lea eax, [ecx + eax*2]
mov dword [ebp - 0x30], eax
cmp ecx, eax
jae 0x76b3d5e8
mov dword [ebp - 0x1c], 0xd
mov edx, ecx
mov edi, dword [ebp - 0x1c]
mov dword [ebp - 0x2c], 0x1a
movzx eax, word [edx]
mov ecx, eax
mov dword [ebp - 0x28], ecx
mov ecx, dword [ebp - 0xc]
cmp ax, word [ebp - 0x2c]
je 0x76b3d5d9
cmp ax, di
je 0x76b3d59c
push 2
pop ecx
mov eax, ecx
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp - 0x28]
movzx ecx, cx
jmp 0x76b3d5bd
mov eax, dword [ebp - 0x30]
add eax, 0xfffffffe
cmp edx, eax
jae 0x76b3d576
mov eax, dword [ebp - 0x14]
cmp word [edx + 2], ax
push 2
pop ecx
mov dword [ebp - 0x18], ecx
mov eax, ecx
mov ecx, dword [ebp - 0x14]
je 0x76b3d5bd
mov ecx, dword [ebp - 0x1c]
mov edi, esi
mov word [esi], cx
mov esi, dword [ebp - 0x18]
add edx, eax
add esi, edi
mov dword [ebp - 0x28], ecx
mov ecx, dword [ebp - 0xc]
mov edi, dword [ebp - 0x1c]
cmp edx, dword [ebp - 0x30]
jb 0x76b3d576
jmp 0x76b3d5e8
mov eax, dword [ebp - 0x10]
mov eax, dword [eax*4 + sym.msvcrt.dll___pioinfo]
or byte [eax + ebx + 4], 2
mov edi, esi
sub edi, ecx
and edi, 0xfffffffe
jmp 0x76b3d522
test ecx, ecx
mov ecx, dword [ebp - 0xc]
je 0x76b3d607
mov edx, dword [ebp - 0x14]
cmp word [ecx], dx
jne 0x76b3d607
or al, 4
jmp 0x76b3d609
and al, 0xfb
mov byte [esi + ebx + 4], al
lea edx, [edi - 1]
add edx, ecx
mov eax, ecx
mov dword [ebp - 0x34], edx
cmp ecx, edx
mov edx, dword [ebp - 0x10]
mov esi, ecx
mov dword [ebp - 0x18], eax
jae 0x76b3d7ab
mov dword [ebp - 0x1c], 0xd
mov dword [ebp - 0x2c], 0x1a
movzx eax, word [eax]
mov dword [ebp - 0x30], eax
cmp ax, word [ebp - 0x2c]
je 0x76b3d78b
mov edx, dword [ebp - 0x18]
add edx, 2
mov dword [ebp - 0x28], edx
mov edx, dword [ebp - 0x10]
cmp ax, word [ebp - 0x1c]
je 0x76b3d668
mov word [esi], ax
add esi, 2
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x18], eax
jmp 0x76b3d780
lea eax, [edi - 2]
add eax, ecx
cmp dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x28]
jae 0x76b3d6a0
movzx ecx, word [eax]
xor eax, eax
cmp cx, word [ebp - 0x14]
sete al
lea eax, [eax*2 + 2]
add dword [ebp - 0x18], eax
xor eax, eax
cmp cx, word [ebp - 0x14]
sete al
dec eax
and eax, 3
add eax, dword [ebp - 0x14]
jmp 0x76b3d774
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x20]
push 0
push eax
push 2
lea eax, [ebp - 8]
push eax
mov eax, dword [edx*4 + sym.msvcrt.dll___pioinfo]
push dword [eax + ebx]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_ReadFile]
test eax, eax
jne 0x76b3d6d1
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
test eax, eax
jne 0x76b3d76e
cmp dword [ebp - 0x20], 0
je 0x76b3d76e
mov edx, dword [ebp - 0x10]
mov eax, dword [edx*4 + sym.msvcrt.dll___pioinfo]
test byte [eax + ebx + 4], 0x48
je 0x76b3d737
mov ecx, dword [ebp - 0x14]
lea eax, [esi + 2]
mov dword [ebp - 0x30], eax
cmp word [ebp - 8], cx
jne 0x76b3d700
mov word [esi], cx
jmp 0x76b3d733
mov eax, dword [ebp - 0x1c]
mov word [esi], ax
mov ecx, dword [edx*4 + sym.msvcrt.dll___pioinfo]
mov al, byte [ebp - 8]
mov byte [ecx + ebx + 5], al
mov ecx, dword [edx*4 + sym.msvcrt.dll___pioinfo]
mov al, byte [ebp - 7]
mov byte [ecx + ebx + 6], al
mov eax, dword [edx*4 + sym.msvcrt.dll___pioinfo]
mov ecx, dword [ebp - 0x14]
mov byte [eax + ebx + 7], cl
mov eax, dword [ebp - 0x30]
mov esi, eax
jmp 0x76b3d77a
mov ecx, dword [ebp - 0xc]
cmp esi, ecx
jne 0x76b3d74f
mov eax, dword [ebp - 0x14]
cmp word [ebp - 8], ax
jne 0x76b3d74f
mov word [esi], ax
add esi, 2
jmp 0x76b3d77d
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.76b3bf3b
mov eax, dword [ebp - 0x14]
add esp, 0x10
mov edx, dword [ebp - 0x10]
cmp word [ebp - 8], ax
je 0x76b3d77a
jmp 0x76b3d771
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x1c]
mov word [esi], ax
add esi, 2
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x34]
jb 0x76b3d635
jmp 0x76b3d7ab
mov edx, dword [edx*4 + sym.msvcrt.dll___pioinfo]
mov al, byte [edx + ebx + 4]
test al, 0x40
jne 0x76b3d7a2
or al, 2
mov byte [edx + ebx + 4], al
jmp 0x76b3d7ab
mov eax, dword [ebp - 0x30]
mov word [esi], ax
add esi, 2
mov edi, esi
sub edi, ecx
jmp 0x76b3d522
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x76b3d7d8
call sym.msvcrt.dll__errno
mov dword [eax], 9
call sym.msvcrt.dll___doserrno
mov dword [eax], esi
jmp 0x76b3d26d
cmp eax, 0x6d
jne 0x76b3d266
xor ebx, ebx
jmp 0x76b3d270
xor eax, eax
jmp 0x76b3d80e
call sym.msvcrt.dll___doserrno
mov dword [eax], edi
call sym.msvcrt.dll__errno
mov dword [eax], 9
push edi
push edi
push edi
push edi
push edi
call sym.msvcrt.dll__invalid_parameter
add esp, 0x14
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret