Function at 0x140007801
Capabilities:
Access peb ldr_data
Parse pe header
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x98
mov rdi, r8
test dl, 1
jne 0x140007ca4
mov qword [rsp + 0x40], rcx
mov rax, qword gs:[0x60]
mov rcx, qword [rax + 0x18]
mov rsi, qword [rcx + 0x10]
lea rbx, [0x14008f757]
lea rax, str.std_src_sys_commonwtf8.rs
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x58], rsi
mov rdx, qword [rsi + 0x60]
test rdx, rdx
je 0x140007dcf
movzx eax, word [rsi + 0x58]
test ax, ax
je 0x140007dcf
mov rdi, qword [rsi + 0x30]
movzx r8d, ax
shr r8d, 1
lea rcx, [rsp + 0x60]
call fcn.1400178f0
mov r12, qword [rsp + 0x68]
mov r13, qword [rsp + 0x70]
test r13, r13
je 0x140007981
lea r15, [r12 + r13]
xor ebp, ebp
mov rcx, r12
lea rax, [rcx + 1]
mov r8b, byte [rcx]
mov edx, 1
test r8b, r8b
jns 0x14000791f
cmp r8b, 0xe0
jae 0x1400078c2
add rcx, 2
cmp rax, r15
cmovne rax, rcx
mov edx, 2
jmp 0x14000791f
cmp r8b, 0xed
jne 0x1400078ee
cmp rax, r15
je 0x14000792e
lea rax, [rcx + 2]
cmp rax, r15
je 0x14000792e
cmp byte [rcx + 1], 0x9f
ja 0x1400079b8
add rcx, 3
mov edx, 3
mov rax, rcx
jmp 0x14000791f
add rcx, 2
cmp rax, r15
cmove rcx, rax
xor eax, eax
cmp rcx, r15
setne al
add rax, rcx
mov edx, 3
cmp r8b, 0xf0
jb 0x14000791f
xor ecx, ecx
cmp rax, r15
setne cl
add rax, rcx
mov edx, 4
add rbp, rdx
mov rcx, rax
cmp rax, r15
jne 0x140007899
movabs r14, 0x8000000000000000
cmp r13, 9
jne 0x14000798b
xor eax, eax
cmp rax, 9
je 0x140007c85
mov cl, byte [r12 + rax]
mov dl, byte [rax + rbx]
inc rax
lea r8d, [rcx - 0x41]
cmp r8b, 0x1a
setb r8b
shl r8b, 5
lea r9d, [rdx - 0x41]
cmp r9b, 0x1a
setb r9b
shl r9b, 5
or r8b, cl
or r9b, dl
cmp r8b, r9b
je 0x140007940
jmp 0x14000798b
movabs r14, 0x8000000000000000
mov rcx, r14
mov rdx, r12
call fcn.140007f3f
mov rcx, qword [rsp + 0x60]
mov rdx, qword [rsp + 0x68]
call fcn.14003a241
mov rsi, qword [rsi]
cmp rsi, qword [rsp + 0x58]
jne 0x14000784e
jmp 0x140007dcf
test r13, r13
js 0x140007e0f
mov al, byte [0x1400950c8]
mov rcx, r13
call fcn.140037450
test rax, rax
je 0x140007e00
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x30], rax
mov r14, r13
sub r14, rbp
jb 0x140007e39
mov rcx, rax
mov rdx, r12
mov r8, rbp
mov qword [rsp + 0x50], rax
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
mov r9, qword [rsp + 0x50]
mov qword [rsp + 0x38], rbp
mov r10, rbp
cmp r14, 2
ja 0x140007a40
mov qword [rsp + 0x20], 1
mov r8d, 3
mov r9d, 1
lea rcx, [rsp + 0x28]
mov rdx, rbp
call fcn.140018750
mov r9, qword [rsp + 0x30]
mov r10, qword [rsp + 0x38]
mov byte [r9 + r10 + 2], 0xbd
mov word [r9 + r10], 0xbfef
add r10, 3
mov qword [rsp + 0x38], r10
add rbp, 3
cmp rbp, r13
ja 0x140007dec
cmp rbp, r13
je 0x140007c21
lea rcx, [r12 + rbp]
mov r14, rbp
mov qword [rsp + 0x90], rcx
lea rax, [rcx + 1]
mov r8b, byte [rcx]
mov edx, 1
test r8b, r8b
jns 0x140007b05
cmp r8b, 0xe0
jae 0x140007aa4
add rcx, 2
cmp rax, r15
cmovne rax, rcx
mov edx, 2
jmp 0x140007b05
cmp r8b, 0xed
jne 0x140007ad4
cmp rax, r15
je 0x140007c24
lea rax, [rcx + 2]
cmp rax, r15
je 0x140007c24
cmp byte [rcx + 1], 0x9f
ja 0x140007b19
add rcx, 3
mov edx, 3
mov rax, rcx
jmp 0x140007b05
add rcx, 2
cmp rax, r15
cmove rcx, rax
xor eax, eax
cmp rcx, r15
setne al
add rax, rcx
mov edx, 3
cmp r8b, 0xf0
jb 0x140007b05
xor ecx, ecx
cmp rax, r15
setne cl
add rax, rcx
mov edx, 4
add r14, rdx
mov rcx, rax
cmp rax, r15
jne 0x140007a7b
jmp 0x140007c24
mov r8, r14
sub r8, rbp
jb 0x140007e16
cmp r14, r13
ja 0x140007e2a
mov rcx, qword [rsp + 0x28]
mov rax, rcx
sub rax, r10
cmp rax, r8
jae 0x140007b79
mov qword [rsp + 0x20], 1
mov r9d, 1
lea rcx, [rsp + 0x28]
mov rdx, r10
mov rbp, r8
call fcn.140018750
mov r10, qword [rsp + 0x38]
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x80], rax
mov r9, qword [rsp + 0x30]
mov r8, rbp
jmp 0x140007b81
mov qword [rsp + 0x80], rcx
mov qword [rsp + 0x88], r10
mov qword [rsp + 0x50], r9
lea rcx, [r9 + r10]
mov rdx, qword [rsp + 0x90]
mov rbp, r8
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
mov r10, qword [rsp + 0x88]
add r10, rbp
mov qword [rsp + 0x38], r10
mov rax, qword [rsp + 0x80]
sub rax, r10
cmp rax, 2
ja 0x140007bf1
mov qword [rsp + 0x20], 1
mov r8d, 3
mov r9d, 1
lea rcx, [rsp + 0x28]
mov rdx, r10
call fcn.140018750
mov r9, qword [rsp + 0x30]
mov r10, qword [rsp + 0x38]
jmp 0x140007bf6
mov r9, qword [rsp + 0x50]
mov byte [r9 + r10 + 2], 0xbd
mov word [r9 + r10], 0xbfef
add r10, 3
mov qword [rsp + 0x38], r10
add r14, 3
mov rbp, r14
cmp r14, r13
jbe 0x140007a63
jmp 0x140007dec
mov rbp, r13
sub r13, rbp
mov r14, qword [rsp + 0x28]
mov rax, r14
sub rax, r10
cmp rax, r13
jae 0x140007c65
mov qword [rsp + 0x20], 1
mov r9d, 1
lea rcx, [rsp + 0x28]
mov rdx, r10
mov r8, r13
call fcn.140018750
mov r10, qword [rsp + 0x38]
mov r14, qword [rsp + 0x28]
mov r9, qword [rsp + 0x30]
add r12, rbp
lea rcx, [r9 + r10]
mov rdx, r12
mov r8, r13
mov r15, r10
mov r12, r9
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add r13, r15
jmp 0x140007938
mov rcx, r14
mov rdx, r12
call fcn.140007f3f
mov rcx, qword [rsp + 0x60]
mov rdx, qword [rsp + 0x68]
call fcn.14003a241
mov rcx, qword [rsp + 0x40]
cmp word [rdi], 0x5a4d
jne 0x140007dc9
movsxd rax, dword [rdi + 0x3c]
cmp dword [rdi + rax], 0x4550
jne 0x140007dc9
mov qword [rsp + 0x40], rcx
mov eax, dword [rdi + rax + 0x88]
mov ebp, dword [rdi + rax + 0x18]
mov ecx, dword [rdi + rax + 0x1c]
mov esi, dword [rdi + rax + 0x20]
mov eax, dword [rdi + rax + 0x24]
add rcx, rdi
mov qword [rsp + 0x58], rcx
add rsi, rdi
add rax, rdi
mov qword [rsp + 0x48], rax
xor r14d, r14d
lea r15, str.Invalid_UTF_8os_errordescriptioninternal_codeunknown_codeOS_Error:
cmp r14, rbp
je 0x140007dcf
mov rbx, r14
mov edx, dword [rsi + r14*4]
add rdx, rdi
mov r8, 0xffffffffffffffff
cmp byte [rdx + r8 + 1], 0
lea r8, [r8 + 1]
jne 0x140007d13
lea rcx, [rsp + 0x60]
call fcn.140004b60
cmp byte [rsp + 0x60], 0
mov r12, qword [rsp + 0x70]
mov eax, 0xd
cmovne r12, rax
mov r13, qword [rsp + 0x68]
cmovne r13, r15
mov r9d, 0xd
mov rcx, r13
mov rdx, r12
mov r8, r15
call fcn.14003a186
test al, al
jne 0x140007dcf
lea r14, [rbx + 1]
mov r9d, 0xd
mov rcx, r13
mov rdx, r12
lea r8, [0x14008f760]
call fcn.14003a186
test al, al
je 0x140007cf9
mov rax, qword [rsp + 0x48]
movzx eax, word [rax + rbx*2]
mov rcx, qword [rsp + 0x58]
mov eax, dword [rcx + rax*4]
add rax, rdi
lea rcx, [0x14008f757]
mov rdx, qword [rsp + 0x40]
mov qword [rdx], rcx
mov qword [rdx + 8], 9
lea rcx, [0x14008f760]
mov qword [rdx + 0x10], rcx
mov qword [rdx + 0x18], 0xd
mov qword [rdx + 0x20], rdi
mov qword [rdx + 0x28], rax
jmp 0x140007dd8
and qword [rcx], 0
jmp 0x140007dd8
mov rax, qword [rsp + 0x40]
and qword [rax], 0
add rsp, 0x98
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea r8, str.std_src_sys_commonwtf8.rs
mov rcx, rbp
mov rdx, r13
call fcn.140003420
jmp 0x140007e49
mov ecx, 1
mov rdx, r13
call fcn.140002d10
jmp 0x140007e49
call fcn.140002d30
jmp 0x140007e49
lea r8, str.std_src_sys_commonwtf8.rs
mov rcx, rbp
mov rdx, r14
call fcn.140005390
jmp 0x140007e49
mov rbp, r14
lea rax, str.std_src_sys_commonwtf8.rs
mov qword [rsp + 0x48], rax
mov rcx, rbp
mov rdx, r13
mov r8, qword [rsp + 0x48]
call fcn.140003e70
ud2