Function at 0x140034264
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x58
mov ebx, r8d
xor r15d, r15d
movsxd r8, ecx
mov r9, rdx
mov dword [rbp - 0x24], 0xfffffffe
mov dword [rbp - 0x1c], r15d
mov dword [rbp - 0x18], ebx
cmp r8d, 0xfffffffe
jne 0x1400342b8
call fcn.14002acdc
mov dword [rax], r15d
call fcn.14002ad58
mov dword [rax], 9
jmp 0x140034aa6
test ecx, ecx
js 0x140034a7f
cmp r8d, dword [0x140044480]
jae 0x140034a7f
mov rax, r8
mov r12, r8
lea r10, [0x140000000]
sar r12, 5
and eax, 0x1f
mov rcx, qword [r10 + r12*8 + 0x444a0]
mov qword [rbp + 0x60], rcx
imul rsi, rax, 0x38
mov r13b, byte [rcx + rsi + 8]
test r13b, 1
je 0x140034a7f
cmp ebx, 0x7fffffff
jbe 0x140034320
call fcn.14002acdc
mov dword [rax], r15d
call fcn.14002ad58
mov dword [rax], 0x16
jmp 0x140034a92
mov edi, r15d
test ebx, ebx
je 0x140034a7b
test r13b, 2
jne 0x140034a7b
test rdx, rdx
je 0x140034308
mov edx, dword [rcx + rsi + 0xc]
mov r11d, 4
and edx, 3
mov eax, edx
mov dword [rbp - 0x20], edx
dec eax
je 0x140034364
dec eax
jne 0x14003435f
mov eax, ebx
not eax
test al, 1
je 0x140034308
and ebx, 0xfffffffe
mov r14, r9
jmp 0x1400343b1
mov eax, ebx
not eax
test al, 1
je 0x140034308
shr ebx, 1
cmp ebx, r11d
cmovb ebx, r11d
mov ecx, ebx
call fcn.14002f3bc
mov r14, rax
test rax, rax
jne 0x14003439f
call fcn.14002ad58
mov dword [rax], 0xc
call fcn.14002acdc
mov dword [rax], 8
jmp 0x140034aa6
mov rcx, qword [rbp + 0x60]
mov edx, dword [rbp - 0x20]
mov r8d, dword [rbp + 0x48]
lea r10, [0x140000000]
mov r15, r14
mov r9d, 0xa
test r13b, 0x48
je 0x14003445e
mov al, byte [rcx + rsi + 9]
cmp al, r9b
je 0x14003445e
test ebx, ebx
je 0x14003445e
mov byte [r14], al
mov rax, qword [r10 + r12*8 + 0x444a0]
or r11d, 0xffffffff
add ebx, r11d
lea r15, [r14 + 1]
lea edi, [r9 - 9]
mov byte [rax + rsi + 9], r9b
test edx, edx
je 0x14003445e
mov rax, qword [r10 + r12*8 + 0x444a0]
mov cl, byte [rax + rsi + 0xa]
cmp cl, r9b
je 0x14003445e
test ebx, ebx
je 0x14003445e
mov byte [r15], cl
mov rax, qword [r10 + r12*8 + 0x444a0]
add ebx, r11d
inc r15
lea edi, [r9 - 8]
mov byte [rax + rsi + 0xa], r9b
cmp edx, 1
jne 0x14003445e
mov rax, qword [r10 + r12*8 + 0x444a0]
mov cl, byte [rax + rsi + 0xb]
cmp cl, r9b
je 0x14003445e
test ebx, ebx
je 0x14003445e
mov byte [r15], cl
mov rax, qword [r10 + r12*8 + 0x444a0]
inc r15
lea edi, [rdx + 2]
add ebx, r11d
mov byte [rax + rsi + 0xb], r9b
mov ecx, r8d
call fcn.140031e14
test eax, eax
je 0x1400344ee
lea rcx, [0x140000000]
mov rcx, qword [rcx + r12*8 + 0x444a0]
test byte [rcx + rsi + 8], 0x80
je 0x1400344ee
mov rcx, qword [rcx + rsi]
lea rdx, [rbp - 0x1c]
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
mov r13d, eax
test eax, eax
je 0x1400344f2
cmp dword [rbp - 0x20], 2
jne 0x1400344f2
and qword [rsp + 0x20], 0
lea rax, [0x140000000]
shr ebx, 1
mov rcx, qword [rax + r12*8 + 0x444a0]
lea r9, [rbp - 0x28]
mov r8d, ebx
mov rcx, qword [rcx + rsi]
mov rdx, r15
call qword [sym.imp.KERNEL32.dll_ReadConsoleW]
test eax, eax
jne 0x1400344e3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.14002ad04
or ebx, 0xffffffff
jmp 0x140034874
mov eax, dword [rbp - 0x28]
lea edx, [rax + rax]
mov dword [rbp - 0x28], edx
jmp 0x14003453a
mov r13d, dword [rbp - 0x1c]
and qword [rsp + 0x20], 0
lea rcx, [0x140000000]
lea r9, [rbp - 0x28]
mov rcx, qword [rcx + r12*8 + 0x444a0]
mov r8d, ebx
mov rdx, r15
mov rcx, qword [rcx + rsi]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140034a45
movsxd rdx, dword [rbp - 0x28]
test edx, edx
js 0x140034a45
mov eax, ebx
cmp rdx, rax
ja 0x140034a45
lea r10, [0x140000000]
add edi, edx
mov rcx, qword [r10 + r12*8 + 0x444a0]
mov al, byte [rcx + rsi + 8]
test al, al
jns 0x140034871
cmp dword [rbp - 0x20], 2
je 0x1400347ea
test edx, edx
mov edx, 0xa
je 0x140034573
cmp byte [r14], dl
jne 0x140034573
or al, 4
jmp 0x140034575
and al, 0xfb
mov byte [rcx + rsi + 8], al
movsxd rax, edi
mov rbx, r14
lea r13, [rax + r14]
mov r15, r14
cmp r14, r13
jae 0x1400346b9
mov edi, 0xd
mov al, byte [r15]
cmp al, 0x1a
je 0x140034699
cmp al, dil
je 0x1400345b1
mov byte [rbx], al
inc rbx
inc r15
jmp 0x14003468e
lea rax, [r13 - 1]
cmp r15, rax
jae 0x1400345d3
lea rax, [r15 + 1]
cmp byte [rax], dl
jne 0x1400345cb
add r15, 2
jmp 0x140034653
mov r15, rax
jmp 0x140034688
mov rcx, qword [r10 + r12*8 + 0x444a0]
and qword [rsp + 0x20], 0
lea r9, [rbp - 0x28]
mov rcx, qword [rcx + rsi]
lea rdx, [rbp + 0x58]
mov r8d, 1
inc r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x14003460a
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x14003467c
cmp dword [rbp - 0x28], 0
je 0x14003467c
lea r10, [0x140000000]
mov rax, qword [r10 + r12*8 + 0x444a0]
test byte [rax + rsi + 8], 0x48
je 0x140034644
mov edx, 0xa
cmp byte [rbp + 0x58], dl
je 0x140034653
mov byte [rbx], dil
mov rcx, qword [r10 + r12*8 + 0x444a0]
mov al, byte [rbp + 0x58]
mov byte [rcx + rsi + 9], al
jmp 0x14003468b
cmp rbx, r14
jne 0x140034657
mov edx, 0xa
cmp byte [rbp + 0x58], dl
jne 0x140034657
mov byte [rbx], dl
jmp 0x14003468b
mov ecx, dword [rbp + 0x48]
mov r8d, 1
or rdx, 0xffffffffffffffff
call fcn.1400327d4
mov edx, 0xa
lea r10, [0x140000000]
cmp byte [rbp + 0x58], dl
je 0x14003468e
jmp 0x140034688
mov edx, 0xa
lea r10, [0x140000000]
mov byte [rbx], dil
inc rbx
cmp r15, r13
jb 0x140034594
jmp 0x1400346b9
mov rcx, qword [r10 + r12*8 + 0x444a0]
mov al, byte [rcx + rsi + 8]
test al, 0x40
jne 0x1400346b1
or al, 2
mov byte [rcx + rsi + 8], al
jmp 0x1400346b9
mov al, byte [r15]
mov byte [rbx], al
inc rbx
mov edi, ebx
sub edi, r14d
cmp dword [rbp - 0x20], 1
jne 0x140034871
test edi, edi
je 0x140034871
dec rbx
test byte [rbx], 0x80
jne 0x1400346e0
inc rbx
jmp 0x14003478f
mov edx, 1
jmp 0x1400346f6
cmp edx, 4
jg 0x140034704
cmp rbx, r14
jb 0x140034704
dec rbx
inc edx
movzx eax, byte [rbx]
cmp byte [rax + r10 + 0x2640], 0
je 0x1400346e7
movzx ecx, byte [rbx]
movsx eax, byte [rcx + r10 + 0x2640]
test eax, eax
jne 0x140034724
call fcn.14002ad58
mov dword [rax], 0x2a
jmp 0x1400344db
inc eax
cmp eax, edx
jne 0x140034732
movsxd rax, edx
add rbx, rax
jmp 0x14003478f
mov rax, qword [r10 + r12*8 + 0x444a0]
test byte [rax + rsi + 8], 0x48
je 0x14003477c
inc rbx
mov byte [rax + rsi + 9], cl
cmp edx, 2
jl 0x14003475e
mov al, byte [rbx]
mov rcx, qword [r10 + r12*8 + 0x444a0]
inc rbx
mov byte [rcx + rsi + 0xa], al
cmp edx, 3
jne 0x140034774
mov al, byte [rbx]
mov rcx, qword [r10 + r12*8 + 0x444a0]
inc rbx
mov byte [rcx + rsi + 0xb], al
movsxd rax, edx
sub rbx, rax
jmp 0x14003478f
mov ecx, dword [rbp + 0x48]
neg edx
mov r8d, 1
movsxd rdx, edx
call fcn.1400327d4
mov rsi, qword [rbp + 0x50]
mov edi, ebx
mov ebx, dword [rbp - 0x18]
mov eax, ebx
sub edi, r14d
mov r8, r14
shr eax, 1
xor edx, edx
mov ecx, 0xfde9
mov dword [rsp + 0x28], eax
mov r9d, edi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x1400347d5
movsxd rdx, eax
add rdx, rdx
cmp rdx, rbx
ja 0x1400347d5
mov ebx, dword [rbp - 0x24]
lea edi, [rax + rax]
jmp 0x140034878
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.14002ad04
or ebx, 0xffffffff
jmp 0x140034878
test r13d, r13d
je 0x140034892
mov eax, edi
mov r8, r14
mov r9, r14
cdq
sub eax, edx
sar eax, 1
movsxd rcx, eax
lea rdx, [r14 + rcx*2]
cmp r14, rdx
jae 0x140034866
mov edi, 0xd
lea ecx, [rdi - 3]
movzx eax, word [r9]
cmp ax, 0x1a
je 0x140034859
cmp ax, di
je 0x140034831
mov word [r8], ax
add r8, 2
add r9, 2
jmp 0x140034852
lea rax, [rdx - 2]
cmp r9, rax
jae 0x140034852
add r9, 2
cmp word [r9], cx
jne 0x14003484a
mov word [r8], cx
jmp 0x14003484e
mov word [r8], di
add r8, 2
cmp r9, rdx
jb 0x140034814
jmp 0x140034866
mov rax, qword [r10 + r12*8 + 0x444a0]
or byte [rax + rsi + 8], 2
sub r8, r14
mov rdi, r8
sar rdi, 1
add edi, edi
mov ebx, dword [rbp - 0x24]
mov rsi, qword [rbp + 0x50]
cmp r14, rsi
je 0x140034885
mov rcx, r14
call fcn.14002e664
cmp ebx, 0xfffffffe
cmove ebx, edi
mov eax, ebx
jmp 0x140034aa9
test edx, edx
mov edx, 0xa
je 0x1400348a5
cmp word [r14], dx
jne 0x1400348a5
or al, 4
jmp 0x1400348a7
and al, 0xfb
lea r13, [r14 - 1]
mov byte [rcx + rsi + 8], al
movsxd rcx, edi
add r13, rcx
mov rbx, r14
mov r15, r14
mov qword [rbp - 0x18], rcx
cmp r14, r13
jae 0x140034a3b
mov edi, 0xd
movzx eax, word [r15]
cmp ax, 0x1a
je 0x140034a18
cmp ax, di
je 0x1400348f0
mov word [rbx], ax
add rbx, 2
add r15, 2
jmp 0x140034a0d
lea rax, [r14 - 2]
add rax, rcx
cmp r15, rax
jae 0x140034924
lea rax, [r15 + 2]
cmp word [rax], dx
jne 0x140034915
add r15, 4
mov word [rbx], dx
add rbx, 2
jmp 0x140034a0d
mov word [rbx], di
mov r15, rax
add rbx, 2
jmp 0x140034a0d
mov rcx, qword [r10 + r12*8 + 0x444a0]
and qword [rsp + 0x20], 0
lea r9, [rbp - 0x28]
mov rcx, qword [rcx + rsi]
lea rdx, [rbp + 0x60]
mov r8d, 2
add r15, 2
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140034960
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1400349f6
cmp dword [rbp - 0x28], 0
je 0x1400349f6
lea r10, [0x140000000]
mov rax, qword [r10 + r12*8 + 0x444a0]
test byte [rax + rsi + 8], 0x48
je 0x1400349bf
mov edx, 0xa
cmp word [rbp + 0x60], dx
jne 0x140034990
mov word [rbx], dx
jmp 0x140034a05
mov word [rbx], di
mov al, byte [rbp + 0x60]
mov rcx, qword [r10 + r12*8 + 0x444a0]
mov byte [rcx + rsi + 9], al
mov al, byte [rbp + 0x61]
mov rcx, qword [r10 + r12*8 + 0x444a0]
mov byte [rcx + rsi + 0xa], al
mov rax, qword [r10 + r12*8 + 0x444a0]
mov byte [rax + rsi + 0xb], dl
jmp 0x140034a05
cmp rbx, r14
jne 0x1400349cf
mov edx, 0xa
cmp word [rbp + 0x60], dx
je 0x14003498b
mov ecx, dword [rbp + 0x48]
mov rdx, 0xfffffffffffffffe
lea r8d, [rdx + 3]
call fcn.1400327d4
mov edx, 0xa
lea r10, [0x140000000]
cmp word [rbp + 0x60], dx
je 0x140034a09
jmp 0x140034a02
mov edx, 0xa
lea r10, [0x140000000]
mov word [rbx], di
add rbx, 2
mov rcx, qword [rbp - 0x18]
cmp r15, r13
jb 0x1400348cd
jmp 0x140034a3b
mov rcx, qword [r10 + r12*8 + 0x444a0]
mov al, byte [rcx + rsi + 8]
test al, 0x40
jne 0x140034a30
or al, 2
mov byte [rcx + rsi + 8], al
jmp 0x140034a3b
movzx eax, word [r15]
mov word [rbx], ax
add rbx, 2
sub ebx, r14d
mov edi, ebx
jmp 0x140034871
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x140034a6b
call fcn.14002ad58
mov dword [rax], 9
call fcn.14002acdc
mov dword [rax], 5
jmp 0x1400344db
cmp eax, 0x6d
jne 0x1400344d4
xor ebx, ebx
jmp 0x140034874
xor eax, eax
jmp 0x140034aa9
call fcn.14002acdc
mov dword [rax], r15d
call fcn.14002ad58
mov dword [rax], 9
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], r15
call fcn.14002add4
or eax, 0xffffffff
add rsp, 0x58
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret