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

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0x358
mov rax, qword [0x140096780]
xor rax, rsp
mov qword [rsp + 0x340], rax
lea rax, [rsp + 0xe0]
mov rdi, rax
mov rsi, qword [rsp + 0x378]
mov ecx, 0x238
rep movsb byte [rdi], byte [rsi]
cmp dword [rsp + 0x2dc], 0
jne 0x140021826
mov dword [rsp + 0xb8], 4
jmp 0x140021834
mov eax, dword [rsp + 0x2dc]
mov dword [rsp + 0xb8], eax
mov eax, dword [rsp + 0xb8]
mov dword [rsp + 0x2dc], eax
cmp dword [rsp + 0x2e0], 0
jne 0x140021859
mov dword [rsp + 0xbc], 1
jmp 0x140021867
mov eax, dword [rsp + 0x2e0]
mov dword [rsp + 0xbc], eax
mov eax, dword [rsp + 0xbc]
mov dword [rsp + 0x2e0], eax
cmp dword [rsp + 0x2e4], 0
jne 0x14002188c
mov dword [rsp + 0xc0], 1
jmp 0x14002189a
mov eax, dword [rsp + 0x2e4]
mov dword [rsp + 0xc0], eax
mov eax, dword [rsp + 0xc0]
mov dword [rsp + 0x2e4], eax
cmp dword [rsp + 0x2e8], 0
jne 0x1400218bf
mov dword [rsp + 0xc4], 2
jmp 0x1400218cd
mov eax, dword [rsp + 0x2e8]
mov dword [rsp + 0xc4], eax
mov eax, dword [rsp + 0xc4]
mov dword [rsp + 0x2e8], eax
cmp dword [rsp + 0x2ec], 0
jne 0x1400218f1
mov eax, dword [0x1400bad48]
mov dword [rsp + 0x60], eax
jmp 0x1400218fc
mov eax, dword [rsp + 0x2ec]
mov dword [rsp + 0x60], eax
mov eax, dword [rsp + 0x60]
mov dword [rsp + 0x2ec], eax
cmp dword [rsp + 0x224], 0
jne 0x14002191b
mov dword [rsp + 0x64], 8
jmp 0x140021926
mov eax, dword [rsp + 0x224]
mov dword [rsp + 0x64], eax
mov eax, dword [rsp + 0x64]
mov dword [rsp + 0x224], eax
cmp dword [rsp + 0x228], 0
jne 0x140021945
mov dword [rsp + 0x68], 1
jmp 0x140021950
mov eax, dword [rsp + 0x228]
mov dword [rsp + 0x68], eax
mov eax, dword [rsp + 0x68]
mov dword [rsp + 0x228], eax
cmp dword [rsp + 0x22c], 0
jne 0x14002196f
mov dword [rsp + 0x6c], 1
jmp 0x14002197a
mov eax, dword [rsp + 0x22c]
mov dword [rsp + 0x6c], eax
mov eax, dword [rsp + 0x6c]
mov dword [rsp + 0x22c], eax
cmp dword [rsp + 0x230], 0
jne 0x140021999
mov dword [rsp + 0x70], 1
jmp 0x1400219a4
mov eax, dword [rsp + 0x230]
mov dword [rsp + 0x70], eax
mov eax, dword [rsp + 0x70]
mov dword [rsp + 0x230], eax
cmp dword [rsp + 0x234], 0
jne 0x1400219c3
mov dword [rsp + 0x74], 8
jmp 0x1400219ce
mov eax, dword [rsp + 0x234]
mov dword [rsp + 0x74], eax
mov eax, dword [rsp + 0x74]
mov dword [rsp + 0x234], eax
cmp dword [rsp + 0x238], 0
jne 0x1400219ed
mov dword [rsp + 0x78], 1
jmp 0x1400219f8
mov eax, dword [rsp + 0x238]
mov dword [rsp + 0x78], eax
mov eax, dword [rsp + 0x78]
mov dword [rsp + 0x238], eax
cmp dword [rsp + 0x23c], 0
jne 0x140021a17
mov dword [rsp + 0x7c], 1
jmp 0x140021a22
mov eax, dword [rsp + 0x23c]
mov dword [rsp + 0x7c], eax
mov eax, dword [rsp + 0x7c]
mov dword [rsp + 0x23c], eax
cmp dword [rsp + 0x240], 0
jne 0x140021a44
mov dword [rsp + 0x80], 1
jmp 0x140021a52
mov eax, dword [rsp + 0x240]
mov dword [rsp + 0x80], eax
mov eax, dword [rsp + 0x80]
mov dword [rsp + 0x240], eax
cmp dword [rsp + 0x20c], 0
jne 0x140021a77
mov dword [rsp + 0x84], 8
jmp 0x140021a85
mov eax, dword [rsp + 0x20c]
mov dword [rsp + 0x84], eax
mov eax, dword [rsp + 0x84]
mov dword [rsp + 0x20c], eax
cmp dword [rsp + 0x208], 0
jne 0x140021aac
mov eax, dword [0x1400bad44]
mov dword [rsp + 0x88], eax
jmp 0x140021aba
mov eax, dword [rsp + 0x208]
mov dword [rsp + 0x88], eax
mov eax, dword [rsp + 0x88]
mov dword [rsp + 0x208], eax
mov eax, 0x24
imul rax, rax, 0
cmp dword [rsp + rax + 0x24c], 1
jne 0x140021ae8
mov dword [rsp + 0x248], 0
jmp 0x140021b1b
cmp dword [rsp + 0x248], 0
jne 0x140021aff
mov dword [rsp + 0x8c], 1
jmp 0x140021b0d
mov eax, dword [rsp + 0x248]
mov dword [rsp + 0x8c], eax
mov eax, dword [rsp + 0x8c]
mov dword [rsp + 0x248], eax
cmp dword [rsp + 0x248], 4
jle 0x140021b30
mov dword [rsp + 0x248], 4
mov dword [rsp + 0x30], 0
jmp 0x140021b44
mov eax, dword [rsp + 0x30]
inc eax
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0x248]
cmp dword [rsp + 0x30], eax
jge 0x140021d35
movsxd rax, dword [rsp + 0x30]
imul rax, rax, 0x24
lea rax, [rsp + rax + 0x24c]
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x50]
cmp dword [rax], 0
jne 0x140021b84
mov eax, dword [0x1400bad40]
mov dword [rsp + 0x90], eax
jmp 0x140021b92
mov rax, qword [rsp + 0x50]
mov eax, dword [rax]
mov dword [rsp + 0x90], eax
mov rax, qword [rsp + 0x50]
mov ecx, dword [rsp + 0x90]
mov dword [rax], ecx
mov rax, qword [rsp + 0x50]
cmp dword [rax + 4], 0
jne 0x140021bb8
mov dword [rsp + 0x94], 0xf
jmp 0x140021bc7
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 4]
mov dword [rsp + 0x94], eax
mov rax, qword [rsp + 0x50]
mov ecx, dword [rsp + 0x94]
mov dword [rax + 4], ecx
movsxd rax, dword [rsp + 0x30]
imul rax, rax, 0x24
lea rax, [rsp + rax + 0x254]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
cmp dword [rax + 4], 0
jne 0x140021c04
mov dword [rsp + 0x98], 2
jmp 0x140021c13
mov rax, qword [rsp + 0x28]
mov eax, dword [rax + 4]
mov dword [rsp + 0x98], eax
mov rax, qword [rsp + 0x28]
mov ecx, dword [rsp + 0x98]
mov dword [rax + 4], ecx
mov rax, qword [rsp + 0x28]
cmp dword [rax + 8], 0
jne 0x140021c3a
mov dword [rsp + 0x9c], 1
jmp 0x140021c49
mov rax, qword [rsp + 0x28]
mov eax, dword [rax + 8]
mov dword [rsp + 0x9c], eax
mov rax, qword [rsp + 0x28]
mov ecx, dword [rsp + 0x9c]
mov dword [rax + 8], ecx
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0xc], 0
jne 0x140021c70
mov dword [rsp + 0xa0], 1
jmp 0x140021c7f
mov rax, qword [rsp + 0x28]
mov eax, dword [rax + 0xc]
mov dword [rsp + 0xa0], eax
mov rax, qword [rsp + 0x28]
mov ecx, dword [rsp + 0xa0]
mov dword [rax + 0xc], ecx
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x10], 0
jne 0x140021ca6
mov dword [rsp + 0xa4], 2
jmp 0x140021cb5
mov rax, qword [rsp + 0x28]
mov eax, dword [rax + 0x10]
mov dword [rsp + 0xa4], eax
mov rax, qword [rsp + 0x28]
mov ecx, dword [rsp + 0xa4]
mov dword [rax + 0x10], ecx
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x14], 0
jne 0x140021cdc
mov dword [rsp + 0xa8], 1
jmp 0x140021ceb
mov rax, qword [rsp + 0x28]
mov eax, dword [rax + 0x14]
mov dword [rsp + 0xa8], eax
mov rax, qword [rsp + 0x28]
mov ecx, dword [rsp + 0xa8]
mov dword [rax + 0x14], ecx
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x18], 0
jne 0x140021d12
mov dword [rsp + 0xac], 1
jmp 0x140021d21
mov rax, qword [rsp + 0x28]
mov eax, dword [rax + 0x18]
mov dword [rsp + 0xac], eax
mov rax, qword [rsp + 0x28]
mov ecx, dword [rsp + 0xac]
mov dword [rax + 0x18], ecx
jmp 0x140021b3a
mov dword [rsp + 0x38], 0
jmp 0x140021d49
mov eax, dword [rsp + 0x38]
inc eax
mov dword [rsp + 0x38], eax
cmp dword [rsp + 0x38], 0x10
jge 0x140021e35
movsxd rax, dword [rsp + 0x38]
imul rax, rax, 0xc
lea rax, [rsp + rax + 0x148]
mov qword [rsp + 0xc8], rax
mov rax, qword [rsp + 0xc8]
cmp dword [rax + 8], 0
jne 0x140021d80
jmp 0x140021e35
mov rax, qword [rsp + 0xc8]
cmp dword [rax], 8
jl 0x140021da8
mov r8d, 0x412d
lea rdx, [0x14008acd0]
lea rcx, [0x14008ad30]
call fcn.140047fbc
xor eax, eax
mov rax, qword [rsp + 0xc8]
movsxd rax, dword [rax]
imul rax, rax, 0xc
lea rax, [rsp + rax + 0xe8]
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x58]
cmp dword [rax + 4], 0
jne 0x140021ddc
mov dword [rsp + 0xb0], 1
jmp 0x140021deb
mov rax, qword [rsp + 0x58]
mov eax, dword [rax + 4]
mov dword [rsp + 0xb0], eax
mov rax, qword [rsp + 0x58]
mov ecx, dword [rsp + 0xb0]
mov dword [rax + 4], ecx
mov rax, qword [rsp + 0x58]
cmp dword [rax + 8], 0
jne 0x140021e12
mov dword [rsp + 0xb4], 1
jmp 0x140021e21
mov rax, qword [rsp + 0x58]
mov eax, dword [rax + 8]
mov dword [rsp + 0xb4], eax
mov rax, qword [rsp + 0x58]
mov ecx, dword [rsp + 0xb4]
mov dword [rax + 8], ecx
jmp 0x140021d3f
mov edx, 0x20
lea rcx, [rsp + 0x320]
call fcn.1400130c0
mov byte [rsp + 0x20], 1
mov dword [rsp + 0x3c], 0
jmp 0x140021e60
mov eax, dword [rsp + 0x3c]
inc eax
mov dword [rsp + 0x3c], eax
cmp dword [rsp + 0x3c], 0x10
jge 0x140021e81
movsxd rax, dword [rsp + 0x3c]
imul rax, rax, 0xc
cmp dword [rsp + rax + 0x14c], 0
je 0x140021e7f
mov byte [rsp + 0x20], 0
jmp 0x140021e56
mov dword [rsp + 0x40], 0
jmp 0x140021e95
mov eax, dword [rsp + 0x40]
inc eax
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0x10
jge 0x140021f4b
movsxd rax, dword [rsp + 0x40]
imul rax, rax, 0xc
lea rax, [rsp + rax + 0x148]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x48]
cmp dword [rax + 8], 0
jne 0x140021ec6
jmp 0x140021f4b
mov rax, qword [rsp + 0x48]
cmp dword [rax], 8
jl 0x140021eeb
mov r8d, 0x4142
lea rdx, [0x14008ad90]
lea rcx, str.a_state__buffer_index___SG_MAX_VERTEX_BUFFERS
call fcn.140047fbc
xor eax, eax
movzx eax, byte [rsp + 0x20]
test eax, eax
je 0x140021f0b
mov rax, qword [rsp + 0x48]
movsxd rax, dword [rax]
mov rcx, qword [rsp + 0x48]
mov eax, dword [rsp + rax*4 + 0x320]
mov dword [rcx + 4], eax
mov rax, qword [rsp + 0x48]
movsxd rax, dword [rax]
mov qword [rsp + 0xd8], rax
mov rcx, qword [rsp + 0x48]
mov ecx, dword [rcx + 8]
call fcn.140013d20
mov rcx, qword [rsp + 0xd8]
add eax, dword [rsp + rcx*4 + 0x320]
mov rcx, qword [rsp + 0x48]
movsxd rcx, dword [rcx]
mov dword [rsp + rcx*4 + 0x320], eax
jmp 0x140021e8b
mov dword [rsp + 0x34], 0
jmp 0x140021f5f
mov eax, dword [rsp + 0x34]
inc eax
mov dword [rsp + 0x34], eax
cmp dword [rsp + 0x34], 8
jge 0x140021fa4
movsxd rax, dword [rsp + 0x34]
imul rax, rax, 0xc
lea rax, [rsp + rax + 0xe8]
mov qword [rsp + 0xd0], rax
mov rax, qword [rsp + 0xd0]
cmp dword [rax], 0
jne 0x140021fa2
movsxd rax, dword [rsp + 0x34]
mov rcx, qword [rsp + 0xd0]
mov eax, dword [rsp + rax*4 + 0x320]
mov dword [rcx], eax
jmp 0x140021f55
lea rax, [rsp + 0xe0]
mov rdi, qword [rsp + 0x370]
mov rsi, rax
mov ecx, 0x238
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x370]
mov rcx, qword [rsp + 0x340]
xor rcx, rsp
call fcn.1400403f0
add rsp, 0x358
pop rdi
pop rsi
ret