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

Disassembly:
push rbx
sub rsp, 0x70
mov rax, qword [rcx + 0x20]
mov qword [rsp + 0x68], rsi
mov rsi, rcx
mov qword [rsp + 0x50], r13
mov r13d, edx
mov rcx, qword [rax + 0x18]
test rcx, rcx
je 0x140040339
call qword [0x1401b4498]
mov rcx, qword [rsi + 0x28]
cmp byte [rcx + 0x11], 0
je 0x140040351
inc dword [rcx + 0x14]
cmp byte [rcx + 0x12], 0
jne 0x140040351
call fcn.140033ad0
mov rdx, qword [rsi]
test rdx, rdx
je 0x14004036b
mov rcx, qword [rdx + 0x18]
test rcx, rcx
je 0x14004036b
call qword [0x1401b4498]
mov rdx, qword [rsi]
mov ebx, dword [rsi + 0x30]
test ebx, ebx
je 0x14004037e
lea eax, [rbx - 5]
cmp eax, 1
ja 0x140040a17
mov rcx, qword [rsi + 0x28]
mov qword [rsp + 0x60], rdi
mov rdi, qword [rsi + 8]
mov qword [rsp + 0x58], r12
mov r8, qword [rcx + 8]
mov qword [rsp + 0x48], r14
mov qword [rsp + 0x40], r15
mov dword [rsp + 0x20], 0
mov rax, qword [r8]
mov qword [rsp + 0x30], rax
mov rax, qword [rdi + 8]
mov rax, qword [rax]
mov qword [rsp + 0x28], rax
test rdx, rdx
je 0x1400403cd
cmp byte [r8 + 0x24], 2
jne 0x1400403cd
mov ebx, 5
jmp 0x1400403ed
xor ebx, ebx
cmp byte [rcx + 0x10], bl
jne 0x1400403ed
xor edx, edx
call fcn.140036b00
mov rcx, qword [rsi + 0x28]
mov ebx, eax
mov rdi, qword [rsi + 8]
mov dword [rsp + 0x20], 1
cmp dword [rsi + 0x14], 0
mov qword [rsp + 0x88], rbp
jne 0x1400404d2
test ebx, ebx
jne 0x140040538
mov rax, qword [rcx + 8]
mov r14, qword [rdi + 8]
mov ebp, dword [rax + 0x30]
cmp byte [rdi + 0x11], bl
je 0x140040427
inc dword [rdi + 0x14]
cmp byte [rdi + 0x12], bl
jne 0x140040427
mov rcx, rdi
call fcn.140033ad0
test byte [r14 + 0x26], 2
je 0x14004044f
cmp byte [rdi + 0x11], 0
je 0x1400404d6
sub dword [rdi + 0x14], 1
jne 0x1400404d6
mov rcx, rdi
call fcn.140033aa0
jmp 0x1400404d6
mov r12d, dword [r14 + 0x30]
lea eax, [rbp - 0x200]
sub r12d, dword [r14 + 0x34]
cmp eax, 0xfe00
ja 0x140040496
lea eax, [rbp - 1]
test ebp, eax
jne 0x140040496
mov rcx, qword [r14 + 0x80]
mov dword [r14 + 0x30], ebp
test rcx, rcx
je 0x140040496
add rcx, 0xfffffffffffffffc
mov qword [r14 + 0x80], rcx
call fcn.1400296e0
mov qword [r14 + 0x80], 0
mov rcx, qword [r14]
lea rdx, [r14 + 0x30]
mov r8d, r12d
call fcn.14002d020
mov ecx, dword [r14 + 0x30]
mov ebp, eax
movzx eax, r12w
sub ecx, eax
mov dword [r14 + 0x34], ecx
cmp byte [rdi + 0x11], 0
je 0x1400404c9
sub dword [rdi + 0x14], 1
jne 0x1400404c9
mov rcx, rdi
call fcn.140033aa0
cmp ebp, 7
jne 0x1400404d6
mov ebx, ebp
jmp 0x140040538
test ebx, ebx
jne 0x140040538
cmp dword [rsi + 0x14], 0
jne 0x140040538
mov rcx, qword [rsi + 8]
mov edx, 2
call fcn.140036b00
mov ebx, eax
test eax, eax
jne 0x140040538
mov rdi, qword [rsi + 8]
mov dword [rsi + 0x14], 1
mov rbp, qword [rdi + 8]
cmp byte [rdi + 0x11], al
je 0x140040514
inc dword [rdi + 0x14]
cmp byte [rdi + 0x12], al
jne 0x140040514
mov rcx, rdi
call fcn.140033ad0
mov rax, qword [rbp + 0x18]
mov rdx, qword [rax + 0x50]
mov eax, dword [rdx + 0x28]
bswap eax
mov dword [rsi + 0x10], eax
cmp byte [rdi + 0x11], 0
je 0x140040538
sub dword [rdi + 0x14], 1
jne 0x140040538
mov rcx, rdi
call fcn.140033aa0
mov rax, qword [rsi + 0x28]
mov r12, qword [rax + 8]
mov rax, qword [rsi + 8]
mov ecx, dword [r12 + 0x30]
mov rax, qword [rax + 8]
mov dword [rsp + 0x90], ecx
mov edx, dword [rax + 0x30]
mov rax, qword [rax]
mov dword [rsp + 0x98], edx
movzx eax, byte [rax + 9]
mov byte [rsp + 0x80], al
test ebx, ebx
jne 0x14004057e
cmp al, 5
jne 0x14004057e
cmp ecx, edx
mov eax, 8
cmovne ebx, eax
mov r12d, dword [r12 + 0x3c]
lea r14, [rsi + 0x18]
xor r15d, r15d
nop word [rax + rax]
test r13d, r13d
js 0x14004059a
cmp r15d, r13d
jge 0x14004060a
mov ebp, dword [rsi + 0x18]
lea r14, [rsi + 0x18]
cmp ebp, r12d
ja 0x14004060a
test ebx, ebx
jne 0x14004064e
mov rax, qword [rsi + 0x28]
xor edx, edx
mov rcx, qword [rax + 8]
mov eax, dword [0x1401b3448]
div dword [rcx + 0x30]
inc eax
cmp ebp, eax
je 0x140040602
mov rcx, qword [rsp + 0x30]
lea r9d, [rbx + 2]
lea r8, [rsp + 0x38]
mov edx, ebp
call fcn.14002eb40
mov ebx, eax
test eax, eax
jne 0x140040602
mov rdi, qword [rsp + 0x38]
xor r9d, r9d
mov edx, ebp
mov rcx, rsi
mov r8, qword [rdi + 8]
call fcn.140040180
mov rcx, rdi
mov ebx, eax
call fcn.14002f1c0
inc dword [r14]
inc r15d
jmp 0x140040590
test ebx, ebx
jne 0x14004064e
mov eax, r12d
mov dword [rsi + 0x38], r12d
sub eax, dword [r14]
inc eax
mov dword [rsi + 0x34], eax
cmp dword [r14], r12d
ja 0x140040657
cmp dword [rsi + 0x3c], ebx
jne 0x1400409cd
mov rax, qword [rsi + 0x28]
mov rcx, qword [rax + 8]
mov rdx, qword [rcx]
mov rax, qword [rdx + 0x70]
mov qword [rsi + 0x40], rax
mov qword [rdx + 0x70], rsi
mov dword [rsi + 0x3c], 1
jmp 0x1400409cd
cmp ebx, 0x65
jne 0x1400409cd
test r12d, r12d
jne 0x1400406b4
mov rdi, qword [rsi + 8]
cmp byte [rdi + 0x11], r12b
je 0x140040677
inc dword [rdi + 0x14]
cmp byte [rdi + 0x12], r12b
jne 0x140040677
mov rcx, rdi
call fcn.140033ad0
mov rax, qword [rdi + 8]
mov dword [rax + 0x3c], 0
mov rcx, qword [rdi + 8]
call fcn.140036a30
cmp byte [rdi + 0x11], 0
mov ebx, eax
je 0x1400406a1
sub dword [rdi + 0x14], 1
jne 0x1400406a1
mov rcx, rdi
call fcn.140033aa0
mov r12d, 1
test ebx, ebx
je 0x1400406b4
cmp ebx, 0x65
jne 0x1400409cd
mov rdi, qword [rsi + 8]
mov ebp, dword [rsi + 0x10]
inc ebp
cmp byte [rdi + 0x11], 0
mov rbx, qword [rdi + 8]
je 0x1400406d8
inc dword [rdi + 0x14]
cmp byte [rdi + 0x12], 0
jne 0x1400406d8
mov rcx, rdi
call fcn.140033ad0
mov rcx, qword [rbx + 0x18]
mov r14, qword [rcx + 0x50]
mov rcx, qword [rcx + 0x70]
call fcn.14002fb30
mov ebx, eax
test eax, eax
jne 0x1400406f5
bswap ebp
mov dword [r14 + 0x28], ebp
cmp byte [rdi + 0x11], 0
je 0x140040709
sub dword [rdi + 0x14], 1
jne 0x140040709
mov rcx, rdi
call fcn.140033aa0
test ebx, ebx
jne 0x1400409cd
mov rcx, qword [rsi]
test rcx, rcx
je 0x14004071e
call fcn.14006b840
cmp byte [rsp + 0x80], 5
jne 0x1400407a3
mov rbx, qword [rsi + 8]
mov r15d, 0xffef
xor edx, edx
mov rcx, rbx
mov rdi, qword [rbx + 8]
and word [rdi + 0x26], r15w
call fcn.140036b00
mov ecx, eax
test eax, eax
jne 0x140040794
mov rax, qword [rdi + 0x18]
mov rbp, qword [rax + 0x50]
cmp byte [rbp + 0x12], 2
jne 0x14004075f
cmp byte [rbp + 0x13], 2
je 0x140040794
mov edx, 2
mov rcx, rbx
call fcn.140036b00
mov ecx, eax
test eax, eax
jne 0x140040794
mov rcx, qword [rdi + 0x18]
mov rcx, qword [rcx + 0x70]
call fcn.14002fb30
mov ecx, eax
mov ebx, eax
test eax, eax
jne 0x140040794
mov word [rbp + 0x12], 0x202
and word [rdi + 0x26], r15w
jmp 0x1400407a3
and word [rdi + 0x26], r15w
mov ebx, ecx
test ecx, ecx
jne 0x1400409cd
movsxd r9, dword [rsp + 0x90]
mov ecx, dword [rsp + 0x98]
cmp r9d, ecx
jge 0x140040994
mov rbp, qword [rsp + 0x28]
mov eax, ecx
cdq
mov r13, r9
idiv r9d
mov r14, qword [rbp + 0x48]
mov r15d, dword [rbp + 0x20]
mov ecx, eax
dec eax
add eax, r12d
movsxd r12, r12d
cdq
idiv ecx
xor edx, edx
mov r8d, eax
mov rax, qword [rsi + 8]
mov rcx, qword [rax + 8]
lea edi, [r8 - 1]
mov eax, dword [0x1401b3448]
div dword [rcx + 0x30]
inc eax
cmp r8d, eax
cmovne edi, r8d
imul r12, r9
cmp edi, r15d
ja 0x14004086d
mov rax, qword [rsi + 8]
xor edx, edx
mov rcx, qword [rax + 8]
mov eax, dword [0x1401b3448]
div dword [rcx + 0x30]
inc eax
cmp edi, eax
je 0x140040862
xor r9d, r9d
lea r8, [rsp + 0x80]
mov edx, edi
mov rcx, rbp
call fcn.14002eb40
mov ebx, eax
test eax, eax
jne 0x140040862
mov rbp, qword [rsp + 0x80]
mov rcx, rbp
call fcn.14002fb30
mov ebx, eax
test rbp, rbp
je 0x14004085d
mov rcx, rbp
call fcn.14002f1c0
mov rbp, qword [rsp + 0x28]
inc edi
test ebx, ebx
je 0x140040805
jmp 0x1400409cd
test ebx, ebx
jne 0x140040881
xor edx, edx
lea r8d, [rbx + 1]
mov rcx, rbp
call fcn.14002fc20
mov ebx, eax
mov eax, dword [rsp + 0x98]
add eax, dword [0x1401b3448]
movsxd r15, eax
mov eax, dword [rsp + 0x90]
cmp r15, r12
cmovge r15, r12
add eax, dword [0x1401b3448]
movsxd rdi, eax
test ebx, ebx
jne 0x1400409cd
cmp rdi, r15
jge 0x140040922
mov rcx, qword [rsp + 0x30]
lea r8, [rsp + 0x80]
mov rax, rdi
mov qword [rsp + 0x80], 0
cqo
xor r9d, r9d
idiv r13
lea edx, [rax + 1]
call fcn.14002eb40
mov rbp, qword [rsp + 0x80]
mov ebx, eax
test eax, eax
jne 0x140040909
mov rax, qword [r14]
mov r9, rdi
mov r8d, dword [rsp + 0x90]
mov rcx, r14
mov rdx, qword [rbp + 8]
call qword [rax + 0x18]
mov ebx, eax
test rbp, rbp
je 0x140040916
mov rcx, rbp
call fcn.14002f1c0
add rdi, r13
test ebx, ebx
je 0x1400408b0
jmp 0x1400409cd
mov rax, qword [r14]
lea rdx, [rsp + 0x80]
mov rcx, r14
call qword [rax + 0x30]
mov ebx, eax
test eax, eax
jne 0x140040951
cmp qword [rsp + 0x80], r12
jle 0x140040951
mov rax, qword [r14]
mov rdx, r12
mov rcx, r14
call qword [rax + 0x20]
mov ebx, eax
test ebx, ebx
jne 0x1400409cd
mov rbp, qword [rsp + 0x28]
mov rcx, qword [rbp + 0x48]
mov rax, qword [rcx]
test rax, rax
je 0x14004097e
xor r8d, r8d
lea edx, [rbx + 0x15]
call qword [rax + 0x50]
mov ebx, eax
cmp eax, 0xc
jne 0x14004097a
xor ebx, ebx
jmp 0x14004097e
test eax, eax
jne 0x1400409b2
cmp byte [rbp + 0xb], 0
jne 0x1400409b2
mov rcx, qword [rbp + 0x48]
movzx edx, byte [rbp + 0x10]
mov rax, qword [rcx]
call qword [rax + 0x28]
jmp 0x1400409b0
mov eax, r9d
xor r8d, r8d
cdq
idiv ecx
mov rcx, qword [rsp + 0x28]
xor edx, edx
imul eax, r12d
mov dword [rcx + 0x20], eax
call fcn.14002fc20
mov ebx, eax
test ebx, ebx
jne 0x1400409cd
mov rcx, qword [rsi + 8]
xor edx, edx
call fcn.140037c70
mov ebx, eax
mov eax, 0x65
test ebx, ebx
cmove ebx, eax
cmp dword [rsp + 0x20], 0
mov r15, qword [rsp + 0x40]
mov r14, qword [rsp + 0x48]
mov r12, qword [rsp + 0x58]
mov rdi, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x88]
je 0x140040a06
mov rcx, qword [rsi + 0x28]
xor edx, edx
call fcn.140037a30
mov rcx, qword [rsi + 0x28]
xor edx, edx
call fcn.140037c70
cmp ebx, 0xc0a
mov eax, 7
cmove ebx, eax
mov dword [rsi + 0x30], ebx
mov rax, qword [rsi]
mov r13, qword [rsp + 0x50]
test rax, rax
je 0x140040a33
mov rcx, qword [rax + 0x18]
test rcx, rcx
je 0x140040a33
call qword [0x1401b44a8]
mov rcx, qword [rsi + 0x28]
cmp byte [rcx + 0x11], 0
je 0x140040a48
sub dword [rcx + 0x14], 1
jne 0x140040a48
call fcn.140033aa0
mov rcx, qword [rsi + 0x20]
mov rsi, qword [rsp + 0x68]
mov rcx, qword [rcx + 0x18]
test rcx, rcx
je 0x140040a60
call qword [0x1401b44a8]
mov eax, ebx
add rsp, 0x70
pop rbx
ret