Function at 0x140022620
Capabilities:
Read file on windows
Resolve function by parsing pe exports

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
mov eax, 0x4e98
call fcn.140024750
sub rsp, rax
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x4e08], 0xfffffffffffffffe
mov rsi, r9
mov ebx, r8d
mov edi, edx
mov r14, rcx
mov ecx, dword [rcx + 0x6c]
call sub.api_ms_win_crt_stdio_l1_1_0.dll__get_osfhandle
cmp rax, 0xfffffffffffffffe
je 0x140022d33
mov r15, rax
cmp rax, 0xffffffffffffffff
je 0x140022d47
lea rdx, [rbp - 0x50]
mov rcx, r15
call sub.KERNEL32.dll_GetConsoleMode
test eax, eax
je 0x1400226f1
test edi, edi
je 0x140022733
mov eax, dword [0x14002f3d8]
test eax, eax
jne 0x140022c0e
cmp dword [0x14002f4e8], 0
je 0x140022900
mov rax, qword [0x14002f4f0]
mov word [rbp - 0x50], ax
lea rdx, [rbp - 0x4e]
mov qword [rsp + 0x20], 0
lea r9, [rbp + 0x4e04]
mov rcx, r15
mov r8d, 0x270f
call sub.KERNEL32.dll_ReadConsoleW
test eax, eax
je 0x140022d7b
mov eax, dword [rbp + 0x4e04]
test eax, eax
jns 0x140022942
jmp 0x140022838
cmp byte [r14 + 0x38], 0
je 0x14002273b
mov qword [rsp + 0x20], 0
lea r9, [rbp + 0x4de4]
mov rcx, r15
mov rdx, rsi
mov r8d, edi
call sub.KERNEL32.dll_ReadFile
test eax, eax
je 0x14002283d
mov r15d, dword [rbp + 0x4de4]
test r15d, r15d
jns 0x140022c95
jmp 0x140022838
xor r15d, r15d
jmp 0x140022c95
mov qword [rbp + 0x4df8], r15
mov rax, qword [r14 + 0x88]
mov qword [rbp + 0x4dd0], rax
mov rax, qword [r14 + 0x80]
mov qword [rbp + 0x4dd8], rax
mov r12d, dword [r14 + 0x78]
mov ecx, 0x50
call sub.gc.dll_GC_malloc
mov qword [rax + 4], 0
mov qword [rax + 0xc], 0
mov qword [rax + 0x14], 0
mov qword [rax + 0x1c], 0
mov qword [rax + 0x24], 0
mov qword [rax + 0x2c], 0
mov qword [rax + 0x34], 0
mov qword [rax + 0x3c], 0
mov qword [rax + 0x44], 0
mov dword [rax + 0x4c], 0
mov qword [rbp + 0x4df0], rax
mov dword [rax], 0x76
call fcn.140019fa0
mov rcx, rax
call fcn.14001a600
mov rax, qword [rax + 0x30]
mov r13, qword [rbp + 0x4df0]
mov qword [r13 + 8], rax
mov dword [r13 + 0x10], 1
mov r15, r13
add r15, 0x28
mov qword [rsp + 0x20], r15
lea r9, [rbp + 0x4de8]
mov rbx, qword [rbp + 0x4df8]
mov rcx, rbx
mov rdx, rsi
mov r8d, edi
call sub.KERNEL32.dll_ReadFile
test eax, eax
je 0x14002286e
mov r15d, dword [rbp + 0x4de8]
mov byte [r13 + 0x48], 1
mov rcx, r13
mov rdx, rbx
call fcn.14001a910
test r15d, r15d
jns 0x140022c95
call fcn.140003430
xor r15d, r15d
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x6d
je 0x140022c95
cmp eax, 5
jne 0x140022d8f
lea rcx, [0x140028db0]
mov rdx, r14
call fcn.140021fb0
mov rcx, rax
call fcn.140019950
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x6c
jle 0x140022cc1
cmp eax, 0x6d
je 0x140022ce2
cmp eax, 0x3e5
jne 0x140022e26
mov ecx, r12d
mov rdx, qword [rbp + 0x4dd8]
mov r8, qword [rbp + 0x4dd0]
call fcn.140022210
mov rdi, qword [rbp + 0x4df0]
mov ecx, dword [rdi + 0x10]
lea eax, [rcx - 1]
cmp eax, 2
jae 0x140022dd3
lea r8, [rbp + 0x4dec]
mov rsi, qword [rbp + 0x4df8]
mov rcx, rsi
mov rdx, r15
xor r9d, r9d
call sub.KERNEL32.dll_GetOverlappedResult
test eax, eax
je 0x140022cfa
mov r15d, dword [rbp + 0x4dec]
mov rcx, rdi
mov rdx, rsi
call fcn.14001a910
test r15d, r15d
jns 0x140022c95
jmp 0x140022838
mov qword [rsp + 0x20], 0
lea rdx, [rbp - 0x50]
lea r9, [rbp + 0x4e04]
mov rcx, r15
mov r8d, 0x2710
call sub.KERNEL32.dll_ReadConsoleW
test eax, eax
je 0x140022d7b
mov eax, dword [rbp + 0x4e04]
test eax, eax
js 0x140022838
sub eax, 1
mov ecx, 0xffffffff
jb 0x140022984
cmp eax, 0x270f
ja 0x140022cb4
mov ecx, eax
movzx ecx, word [rbp + rcx*2 - 0x50]
mov edx, ecx
and edx, 0xfc00
cmp edx, 0xd800
jne 0x140022982
mov dword [0x14002f4e8], 0xb6
mov word [0x14002f4f0], cx
dec eax
mov ecx, eax
test ecx, ecx
jns 0x1400229a1
jmp 0x140022c08
mov ecx, eax
mov dword [0x14002f4e8], 0
mov qword [0x14002f4f0], 0
test ecx, ecx
js 0x140022c08
mov rdx, qword [0x14002f3d0]
lea r8d, [rcx + 1]
xor r11d, r11d
mov rax, rdx
jmp 0x140022a06
mov r11d, r9d
mov r14d, r10d
nop word [rax + rax]
mov r9d, r14d
shr r9d, 0xc
or r9b, 0xe0
mov byte [rax], r9b
mov r9d, r14d
shr r9d, 6
and r9b, 0x3f
or r9b, 0x80
mov byte [rax + 1], r9b
and r14b, 0x3f
or r14b, 0x80
mov byte [rax + 2], r14b
mov r10d, 3
mov r9d, r11d
add rax, r10
lea r11d, [r9 + 1]
cmp r9d, ecx
jge 0x140022b96
test r11d, r11d
mov r9d, r11d
jns 0x140022a1a
mov r9d, r11d
add r9d, r8d
js 0x140022cb4
cmp r9d, ecx
jg 0x140022cb4
mov r9d, r9d
movzx r9d, word [rbp + r9*2 - 0x50]
movzx r10d, r9w
mov r14d, r9d
add r14d, 0x2000
movzx r14d, r14w
cmp r14d, 0xf800
jae 0x140022a70
mov r9d, r11d
cmp r10d, 0x80
jge 0x140022b10
mov byte [rax], r10b
mov r10d, 1
jmp 0x1400229f6
movzx r9d, r9w
mov r14d, 0xfffd
cmp r9d, 0xdc00
jae 0x1400229c0
cmp r11d, ecx
jge 0x1400229c0
lea r9d, [r11 + 1]
cmp r11d, 0xfffffffe
mov r15d, r9d
jg 0x140022aa9
mov r15d, r9d
add r15d, r8d
js 0x140022cb4
cmp r15d, ecx
ja 0x140022cb4
mov r15d, r15d
movzx r15d, word [rbp + r15*2 - 0x50]
and r15d, 0xfc00
cmp r15d, 0xdc00
jne 0x1400229c0
cmp r11d, 0xfffffffe
mov r11d, r9d
jg 0x140022ae4
mov r11d, r9d
add r11d, r8d
js 0x140022cb4
cmp r11d, ecx
ja 0x140022cb4
shl r10d, 0xa
mov r11d, r11d
movzx r11d, word [rbp + r11*2 - 0x50]
lea r10d, [r10 + r11 - 0x35fdc00]
cmp r10d, 0x80
jl 0x140022a57
nop
cmp r10d, 0x800
jae 0x140022b3e
mov r11d, r10d
shr r11d, 6
or r11b, 0xc0
mov byte [rax], r11b
and r10b, 0x3f
or r10b, 0x80
mov byte [rax + 1], r10b
mov r10d, 2
jmp 0x1400229f6
cmp r10d, 0x10000
jb 0x1400229b4
mov r11d, r10d
shr r11d, 0x12
or r11b, 0xf0
mov byte [rax], r11b
mov r11d, r10d
shr r11d, 0xc
and r11b, 0x3f
or r11b, 0x80
mov byte [rax + 1], r11b
mov r11d, r10d
shr r11d, 6
and r11b, 0x3f
or r11b, 0x80
mov byte [rax + 2], r11b
and r10b, 0x3f
or r10b, 0x80
mov byte [rax + 3], r10b
mov r10d, 4
jmp 0x1400229f6
mov r8d, dword [0x14002f3c8]
xor ecx, ecx
test r8d, r8d
js 0x140022bde
sub rax, rdx
js 0x140022bde
cmp rax, r8
mov edx, 0
mov r8d, 0
jg 0x140022be3
mov r8, qword [0x14002f3d0]
movzx ecx, byte [0x14002f3cc]
mov byte [rbp + 0x4e04], cl
movzx edx, cl
shl rdx, 0x20
add rdx, rax
mov ecx, 0x23d
jmp 0x140022be3
xor edx, edx
xor r8d, r8d
test ecx, ecx
je 0x140022cb4
mov rax, rdx
shr rax, 0x20
mov qword [0x14002f3e0], r8
mov dword [0x14002f3d8], edx
and eax, 1
mov byte [0x14002f3dc], al
mov eax, dword [0x14002f3d8]
cmp eax, edi
mov r15d, edi
cmovl r15d, eax
xor ecx, ecx
cmp eax, r15d
mov r14d, r15d
jb 0x140022cac
or eax, r15d
mov eax, 0
mov edx, 0
js 0x140022c54
mov rdx, qword [0x14002f3e0]
movzx eax, byte [0x14002f3dc]
mov byte [rbp - 0x50], al
movzx eax, al
shl rax, 0x20
add rax, r14
mov ecx, 0x23d
test ecx, ecx
je 0x140022cb4
test bl, 1
jne 0x140022d5b
cmp edi, eax
jl 0x140022cb4
test eax, eax
js 0x140022d67
mov r8d, eax
mov rcx, rsi
call sub.VCRUNTIME140.dll_memcpy
test r15d, r15d
js 0x140022cb4
mov eax, dword [0x14002f3d8]
sub eax, r15d
jl 0x140022cb4
mov dword [0x14002f3d8], eax
add qword [0x14002f3e0], r14
mov eax, r15d
add rsp, 0x4e98
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
xor eax, eax
xor edx, edx
test ecx, ecx
jne 0x140022c58
call fcn.1400053c0
mov rcx, rax
call fcn.140005420
cmp eax, 0x26
jne 0x140022da8
xor r15d, r15d
mov rcx, qword [rbp + 0x4df0]
mov rdx, qword [rbp + 0x4df8]
call fcn.14001a910
jmp 0x140022c95
xor r15d, r15d
mov rcx, qword [rbp + 0x4df0]
mov rdx, qword [rbp + 0x4df8]
call fcn.14001a910
jmp 0x140022c95
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x26
je 0x140022d20
cmp eax, 0x6d
jne 0x140022e3f
xor r15d, r15d
mov rcx, rdi
mov rdx, rsi
call fcn.14001a910
jmp 0x140022c95
xor r15d, r15d
mov rcx, rdi
mov rdx, rsi
call fcn.14001a910
jmp 0x140022c95
lea rcx, [0x1400282b0]
call fcn.1400073c0
mov rcx, rax
call fcn.140007430
lea rcx, [0x140028270]
call fcn.1400193d0
mov rcx, rax
call fcn.140007430
lea rcx, [0x1400275c0]
call fcn.140005470
lea rcx, [0x140027440]
call fcn.140003730
mov rcx, rax
call fcn.140003790
lea rcx, [0x140028d90]
call fcn.14001ccf0
mov rcx, rax
call fcn.140019950
lea rcx, [0x140028de0]
mov edx, eax
mov r8, r14
call fcn.1400221b0
mov rcx, rax
call fcn.140019950
cmp eax, 5
jne 0x140022e26
lea rcx, [0x140028550]
lea rdx, [0x140028590]
call fcn.140014260
mov rcx, rax
mov rdx, r14
call fcn.140021fb0
mov rcx, rax
call fcn.140019950
call fcn.140019cd0
mov rsi, rax
mov ecx, 0x30
call sub.gc.dll_GC_malloc
mov qword [rax + 4], 0
mov qword [rax + 0xc], 0
mov qword [rax + 0x14], 0
mov qword [rax + 0x1c], 0
mov qword [rax + 0x24], 0
mov dword [rax + 0x2c], 0
mov dword [rax], 0x43
mov qword [rax + 8], rsi
mov rcx, rax
call fcn.1400054f0
lea rcx, [0x140028e00]
mov edx, eax
mov r8, r14
call fcn.1400221b0
mov rcx, rax
call fcn.140019950
cmp eax, 0x3e4
jne 0x140022ebf
lea rcx, [0x140028e00]
lea rdx, [0x1400286b0]
call fcn.140014260
mov rsi, rax
mov ecx, 0x48
call sub.gc.dll_GC_malloc
mov qword [rax + 4], 0
mov qword [rax + 0xc], 0
mov qword [rax + 0x14], 0
mov qword [rax + 0x1c], 0
mov qword [rax + 0x24], 0
mov qword [rax + 0x2c], 0
mov qword [rax + 0x34], 0
mov dword [rax + 0x3c], 0
mov dword [rax], 0x2d
mov qword [rax + 0x40], 0
mov qword [rax + 8], rsi
mov rcx, rax
call fcn.14001c3e0
lea rcx, [0x1400286d0]
mov edx, eax
call fcn.14001c430
mov rcx, rax
call fcn.140019950
int3