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

Disassembly:
mov qword [rsp + 0x20], r9
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
push rsi
push rdi
sub rsp, 0x58
mov ecx, dword [rsp + 0x70]
call fcn.1400085e0
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x40], 0
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x28], 0
jne 0x14000908b
mov eax, 1
jmp 0x14000934d
cmp qword [rsp + 0x78], 0
jne 0x14000909d
mov eax, 2
jmp 0x14000934d
cmp qword [rsp + 0x88], 0
jne 0x1400090b2
mov eax, 2
jmp 0x14000934d
mov rax, qword [rsp + 0x28]
mov rax, qword [rax + 8]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
movzx eax, byte [rax + 0x23]
cmp eax, 2
je 0x1400090e6
mov rax, qword [rsp + 0x20]
movzx eax, byte [rax + 0x23]
cmp eax, 3
je 0x1400090e6
mov eax, 3
jmp 0x14000934d
mov rax, qword [rsp + 0x20]
movzx eax, byte [rax + 0x22]
test eax, eax
jne 0x1400090fd
mov eax, 8
jmp 0x14000934d
mov rax, qword [rsp + 0x20]
movzx ecx, byte [rax + 0x20]
mov rax, qword [rsp + 0x20]
movzx eax, byte [rax + 0x21]
cmp ecx, eax
jge 0x140009181
mov rax, qword [rsp + 0x20]
movzx edx, byte [rax + 0x21]
mov rax, qword [rsp + 0x20]
movzx ecx, byte [rax + 0x20]
mov eax, edx
sub eax, ecx
movsxd rdx, eax
mov rax, qword [rsp + 0x20]
movzx ecx, byte [rax + 0x20]
mov rax, qword [rsp + 0x20]
lea rsi, [rax + rcx + 0x10]
mov rdi, qword [rsp + 0x30]
mov rcx, rdx
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x20]
movzx edx, byte [rax + 0x21]
mov rax, qword [rsp + 0x20]
movzx ecx, byte [rax + 0x20]
mov eax, edx
sub eax, ecx
movsxd rcx, eax
mov rax, qword [rsp + 0x30]
add rax, rcx
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x20]
mov byte [rax + 0x20], 0x10
mov rax, qword [rsp + 0x20]
mov byte [rax + 0x21], 0x10
mov eax, dword [rsp + 0x80]
cmp dword [rsp + 0x40], eax
jae 0x14000933d
mov rcx, qword [rsp + 0x20]
mov rcx, qword [rcx + 8]
call fcn.140023940
test eax, eax
jne 0x14000933d
lea rdx, [rsp + 0x45]
mov rcx, qword [rsp + 0x20]
call fcn.140009360
mov dword [rsp + 0x3c], eax
cmp dword [rsp + 0x3c], 0
je 0x1400091cb
mov eax, dword [rsp + 0x3c]
jmp 0x14000934d
movzx eax, byte [rsp + 0x45]
cmp eax, 0x10
je 0x1400091eb
mov rax, qword [rsp + 0x20]
cmp qword [rax + 0x28], 0
je 0x1400091eb
mov eax, 0xb
jmp 0x14000934d
mov rax, qword [rsp + 0x20]
cmp qword [rax + 0x28], 0
je 0x140009284
mov rax, qword [rsp + 0x20]
movzx eax, byte [rax + 0x24]
cmp eax, 1
jne 0x140009284
mov rcx, qword [rsp + 0x20]
mov rcx, qword [rcx + 8]
call fcn.140023940
cmp eax, 1
jne 0x140009226
mov dword [rsp + 0x48], 1
jmp 0x14000922e
mov dword [rsp + 0x48], 0
movzx eax, byte [rsp + 0x48]
mov byte [rsp + 0x46], al
mov rcx, qword [rsp + 0x20]
add rcx, 0x10
mov r9, qword [rsp + 0x20]
mov r9, qword [r9 + 0x28]
lea r8, [rsp + 0x44]
movzx edx, byte [rsp + 0x46]
call fcn.140008400
mov dword [rsp + 0x3c], eax
cmp dword [rsp + 0x3c], 0
je 0x14000926c
mov eax, dword [rsp + 0x3c]
jmp 0x14000934d
mov rcx, qword [rsp + 0x20]
movzx eax, byte [rsp + 0x44]
mov byte [rcx + 0x21], al
movzx eax, byte [rsp + 0x44]
mov byte [rsp + 0x45], al
jmp 0x14000929c
mov rax, qword [rsp + 0x20]
movzx eax, byte [rax + 0x24]
cmp eax, 1
jne 0x14000929c
mov eax, 5
jmp 0x14000934d
mov eax, dword [rsp + 0x80]
cmp dword [rsp + 0x40], eax
jbe 0x1400092b3
mov eax, 6
jmp 0x14000934d
mov eax, dword [rsp + 0x40]
mov ecx, dword [rsp + 0x80]
sub ecx, eax
movzx eax, byte [rsp + 0x45]
cmp ecx, eax
jbe 0x1400092d4
movzx eax, byte [rsp + 0x45]
mov dword [rsp + 0x38], eax
jmp 0x1400092ed
mov ecx, dword [rsp + 0x40]
mov eax, dword [rsp + 0x80]
sub eax, ecx
and eax, 0xff
movzx eax, al
mov dword [rsp + 0x38], eax
mov ecx, dword [rsp + 0x38]
mov rsi, qword [rsp + 0x20]
add rsi, 0x10
mov rdi, qword [rsp + 0x30]
rep movsb byte [rdi], byte [rsi]
movzx edx, byte [rsp + 0x38]
mov rax, qword [rsp + 0x20]
movzx ecx, byte [rax + 0x20]
add ecx, edx
mov rax, qword [rsp + 0x20]
mov byte [rax + 0x20], cl
mov ecx, dword [rsp + 0x38]
mov rax, qword [rsp + 0x30]
add rax, rcx
mov qword [rsp + 0x30], rax
mov ecx, dword [rsp + 0x38]
mov eax, dword [rsp + 0x40]
add eax, ecx
mov dword [rsp + 0x40], eax
jmp 0x140009181
mov rcx, qword [rsp + 0x88]
mov eax, dword [rsp + 0x40]
mov dword [rcx], eax
xor eax, eax
add rsp, 0x58
pop rdi
pop rsi
ret