Function at 0x140040a0a
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
mov r13b, byte [rdx + 0x8a]
mov dword [rsp + 0xc8], r9d
mov rsi, rcx
mov rbx, rdx
mov r12d, r8d
and r13d, 1
jne 0x140040c0b
cmp r8d, 2
je 0x140040a4d
mov rax, qword [rbx + 0x38]
test rax, rax
jne 0x140040a6a
jmp 0x140040a7a
mov byte [rcx + 0x1a1], 1
or byte [rdx + 0x8a], 1
cmp word [rdx + 0x88], 0
je 0x140040a42
jmp 0x140040c0b
mov al, byte [rax + 0x13]
shr al, 1
and eax, 3
cmp al, 1
ja 0x140040c0b
mov rdx, qword [rbx + 0x10]
test rdx, rdx
je 0x140040ab5
mov r9, qword [rbx + 8]
mov r8d, dword [rbx + 0x80]
mov rcx, rsi
call qword [rsi + 0x410]
mov rcx, qword [rbx + 0x10]
mov dword [rbx + 0x80], 0xffffffff
call fcn.140074210
xor ecx, ecx
mov qword [rbx + 0x10], rcx
jmp 0x140040c0b
test byte [rbx + 0x8c], 3
jne 0x140040b6d
cmp r12d, 4
jg 0x140040b6d
cmp r12d, 1
je 0x140040b6d
mov rax, qword [rsi + 0x490]
test rax, rax
je 0x140040b6d
mov rdx, qword [rsi + 0x28]
mov r9, qword [rbx + 8]
mov rcx, rsi
mov r8d, dword [rsp + 0xc8]
call rax
mov rdi, rax
test rax, rax
je 0x140040b6d
mov r9d, 1
mov r8d, 2
lea rdx, [0x140087d20]
mov rcx, rsi
call fcn.14003b4a4
mov rcx, rdi
call sub.msvcrt.dll_strlen
mov rdx, rdi
mov r9d, 1
mov rcx, rsi
mov byte [rdi + rax], 0xa
mov r8, rax
xor edi, edi
call fcn.14003b4a4
mov rdx, qword [rax + 0x18]
mov qword [rax + 0x28], rdx
mov al, byte [rbx + 0x8c]
and eax, 0xfffffffc
or eax, 1
mov byte [rbx + 0x8c], al
mov byte [rsi + 0x1a1], 1
or byte [rbx + 0x8a], 1
jmp 0x140040de1
or byte [rbx + 0x8c], 3
test byte [rbx + 0x8a], 4
je 0x140040b8e
mov rax, qword [0x140166770]
test rax, rax
jne 0x140040ba7
jmp 0x140040c12
mov r8d, dword [rsp + 0xc8]
mov rdx, rbx
mov rcx, rsi
call fcn.14003fe2b
test al, al
je 0x140040c0b
jmp 0x140040b7d
cmp r12d, 2
je 0x140040bb3
cmp byte [rax + 8], 0
je 0x140040c12
mov rdx, qword [rbx + 0x60]
lea rdi, [0x14003fed2]
cmp r12d, 2
lea rcx, [rsp + 0x38]
mov qword [rsp + 0x20], rdi
mov r9d, 0x20
mov qword [rsp + 0x38], rdx
mov r8, qword [rax]
lea rdx, [rax + 0x10]
sete byte [rsp + 0x51]
mov byte [rsp + 0x50], 0
mov qword [rsp + 0x58], rbx
call sub.msvcrt.dll_bsearch
test rax, rax
je 0x140040c12
cmp r12d, 2
je 0x140040c0b
mov byte [rsi + 0x1a1], 1
or byte [rbx + 0x8a], 1
xor eax, eax
jmp 0x140040e63
cmp byte [rsi + 0x1a1], 0
jne 0x140040c2e
mov rax, qword [rsi]
xor edi, edi
test rax, rax
jne 0x140040d2f
jmp 0x140040d48
mov rdi, qword [rsi + 0x118]
test rdi, rdi
je 0x140040c1b
cmp rbx, rdi
jne 0x140040c45
mov rdi, qword [rdi + 0x20]
jmp 0x140040c35
cmp r12d, 2
je 0x140040c54
test byte [rdi + 0x8a], 1
je 0x140040c3f
cmp dword [rdi + 0x84], 0
jne 0x140040c3f
mov rax, qword [rbx + 0x70]
cmp qword [rdi + 0x70], rax
jne 0x140040c3f
mov rax, qword [rbx + 0x60]
cmp qword [rdi + 0x60], rax
jne 0x140040c3f
cmp qword [rdi + 0x28], 0
mov rbp, rdi
je 0x140040cbf
test byte [rdi + 0x8a], 4
jne 0x140040cbf
mov r14, qword [rdi + 0x40]
mov edx, 0x90
mov ecx, 1
mov r15, qword [rdi]
call fcn.1400644e2
mov dword [rax + 0x80], 0xffffffff
mov rcx, r15
mov rbp, rax
mov qword [rax + 0x40], r14
call fcn.1400645c0
mov qword [rbp], rax
mov rax, qword [rdi + 8]
mov qword [rbp + 8], rax
test byte [rbp + 0x8a], 4
je 0x140040cd4
mov r8, qword [rbx + 0x60]
cmp qword [rbp + 0x60], r8
jne 0x140040ceb
jmp 0x140040cf0
mov r8d, dword [rsp + 0xc8]
mov rdx, rbp
mov rcx, rsi
call fcn.14003fe2b
test al, al
jne 0x140040cc8
xor r15d, r15d
jmp 0x140040d03
mov rdx, qword [rbx + 0x28]
mov rcx, qword [rbp + 0x28]
call sub.msvcrt.dll_memcmp
test eax, eax
sete r15b
cmp qword [rdi + 0x28], 0
je 0x140040d21
test byte [rdi + 0x8a], 4
jne 0x140040d21
xor edx, edx
mov rcx, rbp
mov qword [rbp + 8], rdx
call fcn.14003f629
test r15b, r15b
je 0x140040c3f
jmp 0x140040c0b
mov rdx, qword [rbx + 0x40]
xor edi, edi
test rdx, rdx
je 0x140040d48
movzx edi, byte [rdx + 0x14]
movzx eax, byte [rax + 0x69]
cmp dil, al
cmovb edi, eax
xor eax, eax
test edi, edi
setne al
cmp dword [rsi + 0x518], eax
jle 0x140040d88
cmp word [rbx + 0x88], 0
jne 0x140040d88
mov rdx, qword [rbx + 8]
cmp byte [rdx], 0
je 0x140040d88
cmp qword [rsi + 0x120], rbx
jne 0x140040d7c
cmp byte [rsi + 0x51f], 0
jne 0x140040d88
mov rcx, qword [rsi + 0x308]
call fcn.14004e4ff
and byte [rbx + 0x8a], 0xfb
xor r9d, r9d
inc word [rbx + 0x88]
cmp byte [rsi + 0x4d7], 0
je 0x140040dad
mov r9b, byte [rsi + 0x54d]
xor r9d, 1
mov rdx, qword [rbx + 0x28]
mov r8, qword [rbx + 0x60]
movzx r9d, r9b
mov rcx, rsi
call fcn.14003b4a4
mov byte [rax + 0x69], dil
mov rdx, qword [rbx + 0x30]
mov qword [rax + 0x50], rbx
mov qword [rax + 0x28], rdx
xor eax, eax
mov byte [rsi + 0x1b8], 1
mov qword [rsi + 0x1a8], rax
cmp qword [rbx + 0x10], 0
jne 0x140040e04
cmp r12d, 2
jg 0x140040e04
mov rdx, qword [rsi + 0x28]
mov eax, dword [rdx + 0x38]
cmp eax, 0x6fffffff
je 0x140040e04
dec eax
mov r13b, 1
mov dword [rdx + 0x38], eax
mov al, byte [rbx + 0x8c]
and eax, 3
dec al
je 0x140040e33
cmp r12d, 6
mov dword [rsp + 0x20], edi
mov r8, qword [rbx + 8]
mov rcx, rsi
setne r9b
xor edx, edx
movzx r9d, r9b
call fcn.14003adab
mov al, 1
jmp 0x140040e63
test r13b, r13b
je 0x140040e2f
mov rbx, qword [rsi + 0x28]
mov rcx, rbx
call fcn.14007ae30
mov edx, dword [rbx + 0x3c]
xor r8d, r8d
movzx ecx, byte [rax + 0xc]
sub edx, dword [rax]
mov eax, dword [rax + 0x18]
shr edx, cl
mov rcx, rbx
lea edx, [rdx + rax - 1]
call fcn.1400485e3
jmp 0x140040e2f
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret