Function at 0x140480170
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, 0x1a8
mov r12d, 8
mov qword [rsp + 0x208], r9
xor r9d, r9d
cmp byte [rcx + 0x42], 0
mov rbx, rcx
mov qword [rsp + 0x1f8], rdx
mov dword [rsp + 0x200], r8d
mov dword [rsp + 0xa8], r9d
jne 0x140480b4b
mov r8d, 1
mov edx, 1
call fcn.140499480
mov dword [rsp + 0x34], eax
test eax, eax
jne 0x140480acf
cmp dword [rsp + 0x200], 0
mov byte [rbx + 0x41], 1
je 0x140480232
mov dword [rsp + 0x20], 1
mov r8, qword [rsp + 0x210]
xor r9d, r9d
mov rcx, rbx
mov rdx, qword [rsp + 0x208]
call fcn.140498640
mov r12d, eax
test eax, eax
jne 0x14048021e
mov eax, dword [rsp + 0x200]
mov byte [rbx + 0x40], 1
mov dword [rsp + 0x34], eax
jmp 0x140480232
cmp eax, 5
jne 0x140480ad4
xor r8d, r8d
mov qword [rsp + 0x208], r8
lea rdx, [rsp + 0xa8]
mov rcx, rbx
call fcn.140498bf0
cmp dword [rsp + 0xa8], 0
mov r12d, eax
je 0x140480265
mov rcx, qword [rbx + 8]
mov rax, qword [rcx]
cmp dword [rax], 2
jle 0x140480265
xor r8d, r8d
xor edx, edx
call fcn.1404632e0
test r12d, r12d
jne 0x140480adf
mov r14d, dword [rbx + 0x58]
mov ax, word [rbx + 0x56]
test r14d, r14d
je 0x1404802ac
mov edx, eax
and eax, 0xfe00
shl edx, 0x10
and edx, 0x10000
or edx, eax
mov dword [rsp + 0x38], edx
cmp dword [rsp + 0x220], edx
je 0x1404802bc
mov ecx, 0x10646
call fcn.140449f10
mov r12d, eax
jmp 0x140480a8b
mov rax, qword [rbx + 0x30]
mov r15, qword [rax]
mov eax, dword [r15 + 0x60]
jmp 0x1404809c1
mov rax, qword [rbx + 0x30]
mov r15, qword [rax]
mov eax, dword [r15 + 0x60]
cmp eax, r14d
jae 0x1404809c1
mov eax, dword [rbx + 0x5c]
lea rbp, [r15 + 0x68]
xor esi, esi
mov edi, 1
mov dword [rsp + 0x68], eax
mov r13d, dword [rbp]
cmp r13d, r14d
jae 0x140480353
mov dword [rsp + 0x20], 1
mov r8, qword [rsp + 0x210]
lea r9d, [rdi + 3]
mov rcx, rbx
mov rdx, qword [rsp + 0x208]
mov dword [rsp + 0x3c], r9d
call fcn.140498640
mov esi, eax
test eax, eax
jne 0x14048033d
cmp edi, 1
mov eax, 0xffffffff
mov r8d, 1
mov rcx, rbx
cmove eax, r14d
mov dword [rbp], eax
mov edx, dword [rsp + 0x3c]
call fcn.140499a70
jmp 0x140480353
cmp eax, 5
jne 0x140480a7e
xor ecx, ecx
mov r14d, r13d
mov qword [rsp + 0x208], rcx
inc edi
add rbp, 4
cmp edi, 5
jne 0x1404802e2
mov eax, dword [r15 + 0x60]
xor ebp, ebp
cmp eax, r14d
jae 0x1404809b8
mov eax, dword [rbx + 0x58]
mov r13d, dword [r15 + 0x60]
mov dword [rsp + 0x3c], eax
add eax, 0x1000
mov edx, dword [rsp + 0x3c]
sub rax, 0xfdf
shr rax, 0xc
lea esi, [rax + 1]
mov dword [rsp + 0x78], eax
cdqe
shl rax, 4
mov dword [rsp + 0x6c], esi
lea rsi, [rax + rdx + 0x14]
add rsi, rsi
mov rcx, rsi
call fcn.14048a590
xor ecx, ecx
mov rbp, rax
test rax, rax
je 0x140480815
xor eax, eax
mov rcx, rsi
mov rdi, rbp
rep stosb byte [rdi], al
mov eax, dword [rsp + 0x6c]
mov ecx, 0x1000
cmp dword [rsp + 0x3c], ecx
cmovbe ecx, dword [rsp + 0x3c]
mov dword [rbp + 4], eax
mov ecx, ecx
add rcx, rcx
call fcn.14048a590
cmp rax, 1
mov qword [rsp + 0x40], rax
lea eax, [r13 + 0x1001]
sbb esi, esi
sub rax, 0xfdf
sar rax, 0xc
and esi, 7
mov r13, rax
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x70], rax
shl r13, 5
add r13, rbp
mov edi, dword [rsp + 0x48]
test esi, esi
jne 0x140480684
cmp dword [rsp + 0x6c], edi
jle 0x140480684
lea r8, [rsp + 0xb8]
mov edx, edi
mov rcx, rbx
call fcn.140498930
mov esi, eax
test eax, eax
jne 0x140480676
mov rax, qword [rsp + 0xc0]
mov edx, dword [rsp + 0xc8]
mov qword [rsp + 0x58], rax
cmp dword [rsp + 0x78], edi
jne 0x140480472
mov eax, dword [rsp + 0x3c]
sub eax, edx
jmp 0x140480486
mov rax, qword [rsp + 0xb8]
mov rdi, qword [rsp + 0x58]
sub rax, rdi
sar rax, 2
movsxd rcx, dword [rbp + 4]
mov dword [rsp + 0x50], eax
mov eax, edx
add rax, rax
shl rcx, 5
lea rax, [rcx + rax + 8]
add rax, rbp
mov qword [rsp + 0x60], rax
lea eax, [rdx + 1]
mov dword [rsp + 0x7c], eax
xor eax, eax
cmp dword [rsp + 0x50], eax
jle 0x1404804c1
mov rdi, qword [rsp + 0x60]
mov word [rdi + rax*2], ax
inc rax
jmp 0x1404804ad
xor edx, edx
xor eax, eax
mov ecx, 0x34
mov qword [rsp + 0xb0], rdx
lea rdx, [rsp + 0xd0]
lea r10, [rsp + 0xd8]
mov rdi, rdx
mov dword [rsp + 0xac], eax
xor eax, eax
xor edx, edx
rep stosd dword [rdi], eax
xor eax, eax
mov dword [rsp + 0x80], eax
cmp dword [rsp + 0x50], eax
jle 0x1404805d7
mov rdi, qword [rsp + 0x60]
lea rdx, [rax + rax]
mov dword [rsp + 0xac], 1
lea r11, [rsp + 0xac]
add rdx, rdi
xor edi, edi
mov qword [rsp + 0xb0], rdx
mov r9d, dword [rsp + 0x80]
mov ecx, edi
mov edx, edi
sar r9d, cl
mov ecx, r9d
and cl, 1
je 0x1404805ab
mov qword [rsp + 0x98], rax
mov rax, qword [rsp + 0x40]
mov rdx, rdi
inc rdi
mov qword [rsp + 0x20], r11
shl rdx, 4
mov r9, qword [rsp + 0x70]
mov qword [rsp + 0x28], rax
mov rcx, qword [rsp + 0x58]
mov r8d, dword [rsp + rdx + 0xd0]
mov rdx, qword [r10 + rdx]
mov qword [rsp + 0x90], r11
mov qword [rsp + 0x88], r10
call fcn.1404994c0
mov rax, qword [rsp + 0x98]
mov r11, qword [rsp + 0x90]
mov r10, qword [rsp + 0x88]
jmp 0x14048052e
mov rcx, qword [rsp + 0xb0]
mov edi, edi
inc rax
shl rdi, 4
mov qword [rsp + rdi + 0xd8], rcx
mov ecx, dword [rsp + 0xac]
mov dword [rsp + rdi + 0xd0], ecx
jmp 0x1404804f4
lea edi, [rdx + 1]
lea r11, [rsp + 0xd8]
lea r10, [rsp + 0xac]
cmp edi, 0xc
ja 0x140480651
mov eax, dword [rsp + 0x50]
mov ecx, edi
sar eax, cl
test al, 1
je 0x14048064c
mov rdx, qword [rsp + 0x40]
mov rax, rdi
mov qword [rsp + 0x20], r10
shl rax, 4
mov r9, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x58]
mov qword [rsp + 0x88], r10
mov qword [rsp + 0x28], rdx
mov rdx, qword [r11 + rax]
mov r8d, dword [rsp + rax + 0xd0]
mov qword [rsp + 0x80], r11
call fcn.1404994c0
mov r10, qword [rsp + 0x88]
mov r11, qword [rsp + 0x80]
inc rdi
jmp 0x1404805ea
mov eax, dword [rsp + 0x7c]
mov dword [r13 + 0x24], eax
mov eax, dword [rsp + 0xac]
mov dword [r13 + 0x20], eax
mov rax, qword [rsp + 0x60]
mov qword [r13 + 0x10], rax
mov rax, qword [rsp + 0x58]
mov qword [r13 + 0x18], rax
inc qword [rsp + 0x48]
add r13, 0x20
jmp 0x14048041e
mov rcx, qword [rsp + 0x40]
call fcn.140489690
test esi, esi
jne 0x1404806c4
mov dword [rsp + 0x20], 1
mov r9d, 3
mov rcx, rbx
mov r8, qword [rsp + 0x210]
mov rdx, qword [rsp + 0x208]
call fcn.140498640
mov esi, eax
test eax, eax
jne 0x1404809b8
jmp 0x1404806d3
mov rcx, rbp
xor ebp, ebp
call fcn.140489690
jmp 0x1404809b8
mov eax, dword [r15 + 0x60]
mov rcx, qword [rbx + 0x10]
mov dword [r15 + 0x80], r14d
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0x218]
sar eax, 2
and eax, 3
mov edx, eax
mov dword [rsp + 0x3c], eax
call fcn.1404632b0
mov rcx, qword [rbx + 8]
test eax, eax
mov edi, eax
jne 0x140480b39
movsxd rdi, dword [rsp + 0x38]
mov eax, dword [rsp + 0x68]
xor r8d, r8d
mov edx, 0x27
imul rax, rdi
mov qword [rsp + 0xb8], rax
call fcn.140463230
mov rcx, qword [rbx + 8]
lea rdx, [rsp + 0xd0]
call fcn.140463260
mov esi, eax
test eax, eax
jne 0x140480934
mov rcx, qword [rsp + 0xd0]
mov rdx, qword [rsp + 0xb8]
cmp rcx, rdx
jge 0x1404807a1
mov eax, dword [rbx + 0x58]
imul rax, rdi
lea rax, [rcx + rax + 0x10000]
cmp rdx, rax
jle 0x14048078b
mov ecx, 0xff39
call fcn.140449f10
mov edi, eax
test eax, eax
je 0x1404807a1
mov rcx, qword [rbx + 8]
jmp 0x140480b39
mov rcx, qword [rbx + 8]
lea r8, [rsp + 0xb8]
mov edx, 5
call fcn.140463250
mov eax, dword [rsp + 0x38]
xor r13d, r13d
add eax, 0x18
cdqe
mov qword [rsp + 0x50], rax
movsxd rax, dword [rsp + 0x38]
mov qword [rsp + 0x58], rax
jmp 0x14048083b
mov dword [rbp], edi
cmp edi, 0xffffffff
je 0x140480934
mov rax, qword [rsp + 0x1f8]
mov eax, dword [rax + 0x198]
test eax, eax
je 0x140480825
mov rax, qword [rsp + 0x1f8]
xor r8d, r8d
mov rcx, qword [rbx + 8]
mov edx, 0x25
cmp byte [rax + 0x67], 0
je 0x1404808a7
call fcn.140463230
mov rcx, rbx
mov r8d, 1
mov edx, 3
call fcn.140499a70
mov rcx, rbp
call fcn.140489690
mov r12d, 7
jmp 0x140480adf
cmp dword [rsp + 0x40], r13d
setae al
cmp r14d, r13d
setb dl
or al, dl
je 0x1404808d2
movsxd rax, dword [rbp + 4]
mov r10d, dword [rbp]
or edi, 0xffffffff
lea r8d, [rax - 1]
shl rax, 5
add rax, rbp
test r8d, r8d
js 0x1404807be
mov edx, dword [rax]
mov dword [rsp + 0x48], edx
mov edx, dword [rax - 0x18]
mov ecx, dword [rsp + 0x48]
cmp edx, ecx
jge 0x14048089e
mov r11, qword [rax - 0x10]
movsxd rcx, edx
mov r9, qword [rax - 8]
movzx r11d, word [r11 + rcx*2]
mov rcx, r11
mov r11d, dword [r9 + r11*4]
cmp r10d, r11d
jae 0x140480897
cmp r11d, edi
jae 0x14048089e
add ecx, dword [rax + 4]
mov edi, r11d
mov r13d, ecx
jmp 0x14048089e
inc edx
mov dword [rax - 0x18], edx
jmp 0x140480860
dec r8d
sub rax, 0x20
jmp 0x140480851
call fcn.140463230
mov r8d, 1
mov edx, 3
mov rcx, rbx
call fcn.140499a70
mov rcx, rbp
mov r12d, 9
call fcn.140489690
jmp 0x140480adf
cmp dword [rsp + 0x68], edi
jb 0x14048083b
mov rdx, qword [rsp + 0x50]
lea eax, [r13 - 1]
mov rcx, qword [rbx + 0x10]
mov r8d, dword [rsp + 0x38]
imul rax, rdx
mov rdx, qword [rsp + 0x228]
lea r9, [rax + 0x38]
call fcn.140463280
test eax, eax
jne 0x140480932
mov rax, qword [rsp + 0x58]
lea r9d, [rdi - 1]
mov rcx, qword [rbx + 8]
mov r8d, dword [rsp + 0x38]
mov rdx, qword [rsp + 0x228]
imul r9, rax
call fcn.1404632f0
test eax, eax
je 0x14048083b
mov esi, eax
mov rcx, qword [rbx + 8]
xor r8d, r8d
mov edx, 0x25
call fcn.140463230
test esi, esi
jne 0x1404809a1
mov rax, qword [rbx + 0x30]
mov rax, qword [rax]
mov eax, dword [rax + 0x10]
cmp eax, r14d
je 0x140480971
mov dword [r15 + 0x60], r14d
mov r8d, 1
mov edx, 3
mov rcx, rbx
call fcn.140499a70
jmp 0x1404809c5
mov edx, dword [rbx + 0x5c]
movsxd rax, dword [rsp + 0x38]
mov rcx, qword [rbx + 8]
imul rdx, rax
call fcn.1404632d0
mov edi, eax
test eax, eax
jne 0x1404809a3
mov rcx, qword [rbx + 8]
mov edx, dword [rsp + 0x3c]
call fcn.1404632b0
mov edi, eax
test eax, eax
jne 0x1404809a3
jmp 0x140480958
mov edi, esi
mov r8d, 1
mov edx, 3
mov rcx, rbx
mov esi, edi
call fcn.140499a70
cmp esi, 5
jne 0x1404809c5
xor esi, esi
jmp 0x1404809c5
xor esi, esi
xor ebp, ebp
test esi, esi
jne 0x140480a80
cmp dword [rsp + 0x34], 0
je 0x140480a80
mov eax, dword [r15 + 0x60]
cmp eax, dword [rbx + 0x58]
jae 0x1404809f4
mov rcx, rbp
mov r12d, 5
call fcn.140489690
jmp 0x140480a96
cmp dword [rsp + 0x34], 1
jg 0x140480a08
mov rcx, rbp
call fcn.140489690
jmp 0x140480a96
lea rdx, [rsp + 0xd0]
mov ecx, 4
call fcn.14048ab80
mov dword [rsp + 0x20], 4
mov rcx, rbx
mov r8, qword [rsp + 0x210]
mov rdx, qword [rsp + 0x208]
mov r9d, 4
call fcn.140498640
mov esi, eax
test eax, eax
jne 0x140480a80
cmp dword [rsp + 0x34], 3
jne 0x140480a69
mov edx, dword [rsp + 0xd0]
mov rcx, rbx
call fcn.140499570
mov rcx, qword [rbx + 0x10]
xor edx, edx
call fcn.1404632d0
mov esi, eax
mov r8d, 4
mov edx, 4
mov rcx, rbx
call fcn.140499a70
jmp 0x140480a80
xor ebp, ebp
mov rcx, rbp
mov r12d, esi
call fcn.140489690
test r12d, r12d
je 0x140480a96
cmp r12d, 5
jne 0x140480adf
cmp qword [rsp + 0x230], 0
je 0x140480aae
mov eax, dword [rbx + 0x58]
mov rsi, qword [rsp + 0x230]
mov dword [rsi], eax
cmp qword [rsp + 0x238], 0
je 0x140480adf
mov rax, qword [rbx + 0x30]
mov rsi, qword [rsp + 0x238]
mov rax, qword [rax]
mov eax, dword [rax + 0x60]
mov dword [rsi], eax
jmp 0x140480adf
mov r12d, dword [rsp + 0x34]
mov eax, dword [rsp + 0x200]
mov dword [rsp + 0x34], eax
cmp dword [rsp + 0xa8], 0
je 0x140480af9
lea rdx, [rbx + 0x48]
mov ecx, 0xc
xor eax, eax
mov rdi, rdx
rep stosd dword [rdi], eax
mov rcx, rbx
call fcn.140480d10
cmp byte [rbx + 0x41], 0
je 0x140480b1e
mov r8d, 1
mov edx, 1
mov rcx, rbx
call fcn.140499a70
mov byte [rbx + 0x41], 0
test r12d, r12d
jne 0x140480b4b
mov eax, dword [rsp + 0x34]
cmp dword [rsp + 0x200], eax
mov eax, 5
cmovne r12d, eax
jmp 0x140480b4b
xor r8d, r8d
mov edx, 0x25
call fcn.140463230
jmp 0x1404809a3
mov eax, r12d
add rsp, 0x1a8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret