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

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0xa8
mov rax, qword [0x140138010]
xor rax, rsp
mov qword [rsp + 0x98], rax
mov rax, qword [rsp + 0xc0]
mov rcx, qword [rax + 8]
call fcn.14003e6c0
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0xc0]
mov rcx, qword [rax + 0x28]
call fcn.140030e70
mov dword [rsp + 0x24], eax
mov rax, qword [rsp + 0xc0]
mov rcx, qword [rax + 8]
call fcn.140030e70
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x28]
cmp dword [rsp + 0x24], eax
jge 0x140040bd2
mov eax, dword [rsp + 0x24]
mov dword [rsp + 0x38], eax
jmp 0x140040bda
mov eax, dword [rsp + 0x28]
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x38]
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0xc8]
movsxd rcx, dword [rsp + 0x24]
imul rax, rcx
mov qword [rsp + 0x48], rax
mov dword [rsp + 0x20], 0
movsxd rax, dword [rsp + 0x24]
mov rcx, qword [rsp + 0x48]
sub rcx, rax
mov rax, rcx
mov qword [rsp + 0x30], rax
jmp 0x140040c2b
movsxd rax, dword [rsp + 0x28]
mov rcx, qword [rsp + 0x30]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x30], rax
cmp dword [rsp + 0x20], 0
jne 0x140040dde
mov rax, qword [rsp + 0x48]
cmp qword [rsp + 0x30], rax
jge 0x140040dde
mov qword [rsp + 0x90], 0
movsxd rax, dword [rsp + 0x28]
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x30]
cqo
mov rcx, qword [rsp + 0x58]
idiv rcx
inc eax
mov dword [rsp + 0x3c], eax
mov rax, qword [rsp + 0xc0]
mov rax, qword [rax + 8]
mov rax, qword [rax + 8]
mov qword [rsp + 0x60], rax
xor edx, edx
mov eax, dword [0x14013d5b8]
mov rcx, qword [rsp + 0x60]
div dword [rcx + 0x34]
inc eax
cmp dword [rsp + 0x3c], eax
jne 0x140040ca3
jmp 0x140040c16
xor r9d, r9d
lea r8, [rsp + 0x90]
mov edx, dword [rsp + 0x3c]
mov rcx, qword [rsp + 0x68]
call fcn.140023f50
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x20], 0
jne 0x140040dcc
mov rcx, qword [rsp + 0x90]
call fcn.140024910
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x20], 0
jne 0x140040dcc
movsxd rax, dword [rsp + 0x24]
mov qword [rsp + 0x70], rax
mov rax, qword [rsp + 0x30]
cqo
mov rcx, qword [rsp + 0x70]
idiv rcx
mov rax, rdx
mov rcx, qword [rsp + 0xd0]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x88], rax
mov rcx, qword [rsp + 0x90]
call fcn.140025a00
mov qword [rsp + 0x80], rax
movsxd rax, dword [rsp + 0x28]
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x30]
cqo
mov rcx, qword [rsp + 0x78]
idiv rcx
mov rax, rdx
mov rcx, qword [rsp + 0x80]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x50], rax
movsxd rax, dword [rsp + 0x40]
mov rdi, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x88]
mov rcx, rax
rep movsb byte [rdi], byte [rsi]
mov rcx, qword [rsp + 0x90]
call fcn.140025a10
mov ecx, 1
imul rcx, rcx, 0
mov byte [rax + rcx], 0
cmp qword [rsp + 0x30], 0
jne 0x140040dcc
cmp dword [rsp + 0xd8], 0
jne 0x140040dcc
mov rax, qword [rsp + 0xc0]
mov rcx, qword [rax + 0x28]
call fcn.14002fbb0
mov ecx, 1
imul rcx, rcx, 0x1c
mov rdx, qword [rsp + 0x50]
add rdx, rcx
mov rcx, rdx
mov edx, eax
call fcn.140011da0
mov rcx, qword [rsp + 0x90]
call fcn.140024030
jmp 0x140040c16
mov eax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x98]
xor rcx, rsp
call fcn.140124a90
add rsp, 0xa8
pop rdi
pop rsi
ret