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

Disassembly:
mov qword [rsp + 0x20], r9
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0x68
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x28], 0
cmp qword [rsp + 0x70], 0
jne 0x180078615
mov r8d, 0x2a27
lea rdx, [0x18014fe80]
lea rcx, [0x18014fc88]
call fcn.1800f53dc
xor eax, eax
cmp qword [rsp + 0x90], 0
jne 0x18007863b
mov r8d, 0x2a28
lea rdx, [0x18014fe90]
lea rcx, str.p_header_size___00
call fcn.1800f53dc
xor eax, eax
cmp qword [rsp + 0x98], 0
jne 0x180078661
mov r8d, 0x2a29
lea rdx, [0x18014fea0]
lea rcx, [0x18014fd78]
call fcn.1800f53dc
xor eax, eax
cmp qword [rsp + 0x88], 0
jne 0x180078687
mov r8d, 0x2a2a
lea rdx, [0x18014feb0]
lea rcx, [0x18014fec0]
call fcn.1800f53dc
xor eax, eax
mov rax, qword [rsp + 0x70]
add rax, 0x70
mov qword [rsp + 0x40], rax
mov eax, dword [rsp + 0x78]
imul rax, rax, 0x1640
mov rcx, qword [rsp + 0x40]
add rax, qword [rcx + 0x70]
mov qword [rsp + 0x50], rax
mov eax, dword [rsp + 0x80]
imul rax, rax, 0x438
mov rcx, qword [rsp + 0x50]
add rax, qword [rcx + 0x15e0]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x40]
mov eax, dword [rax + 0x20]
imul eax, dword [rcx + 0x24]
cmp dword [rsp + 0x78], eax
jb 0x1800786ff
mov r8d, 0x2a31
lea rdx, [0x18014fee0]
lea rcx, str.p_tile_no___l_cp__tw__l_cp__th
call fcn.1800f53dc
xor eax, eax
mov rax, qword [rsp + 0x70]
mov rax, qword [rax + 0x60]
mov eax, dword [rax + 0x10]
cmp dword [rsp + 0x80], eax
jb 0x18007872f
mov r8d, 0x2a32
lea rdx, [0x18014ff30]
lea rcx, [0x18014ff40]
call fcn.1800f53dc
xor eax, eax
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x18], 1
jne 0x180078744
mov dword [rsp + 0x3c], 1
jmp 0x180078754
mov rax, qword [rsp + 0x28]
imul eax, dword [rax + 4], 3
sub eax, 2
mov dword [rsp + 0x3c], eax
mov eax, dword [rsp + 0x3c]
mov dword [rsp + 0x30], eax
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x18], 0
jne 0x180078848
mov eax, dword [rsp + 0x30]
inc eax
mov dword [rsp + 0x34], eax
mov rax, qword [rsp + 0x90]
mov ecx, dword [rsp + 0x34]
cmp dword [rax], ecx
jae 0x1800787a5
lea r8, [0x18014fd98]
mov edx, 1
mov rcx, qword [rsp + 0x98]
call fcn.18006c770
xor eax, eax
jmp 0x180078957
mov rax, qword [rsp + 0x28]
mov eax, dword [rax + 0x324]
shl eax, 5
mov rcx, qword [rsp + 0x28]
add eax, dword [rcx + 0x18]
mov r8d, 1
mov edx, eax
mov rcx, qword [rsp + 0x88]
call fcn.18005fef0
mov rax, qword [rsp + 0x88]
inc rax
mov qword [rsp + 0x88], rax
mov dword [rsp + 0x20], 0
jmp 0x1800787f7
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x30]
cmp dword [rsp + 0x20], eax
jae 0x180078843
mov eax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x28]
mov eax, dword [rcx + rax*8 + 0x1c]
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x38]
shl eax, 3
mov r8d, 1
mov edx, eax
mov rcx, qword [rsp + 0x88]
call fcn.18005fef0
mov rax, qword [rsp + 0x88]
inc rax
mov qword [rsp + 0x88], rax
jmp 0x1800787ed
jmp 0x180078938
mov eax, dword [rsp + 0x30]
lea eax, [rax + rax + 1]
mov dword [rsp + 0x34], eax
mov rax, qword [rsp + 0x90]
mov ecx, dword [rsp + 0x34]
cmp dword [rax], ecx
jae 0x180078884
lea r8, str.Error_writing_SQcd_SQcc_element_n
mov edx, 1
mov rcx, qword [rsp + 0x98]
call fcn.18006c770
xor eax, eax
jmp 0x180078957
mov rax, qword [rsp + 0x28]
mov eax, dword [rax + 0x324]
shl eax, 5
mov rcx, qword [rsp + 0x28]
add eax, dword [rcx + 0x18]
mov r8d, 1
mov edx, eax
mov rcx, qword [rsp + 0x88]
call fcn.18005fef0
mov rax, qword [rsp + 0x88]
inc rax
mov qword [rsp + 0x88], rax
mov dword [rsp + 0x20], 0
jmp 0x1800788d6
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x30]
cmp dword [rsp + 0x20], eax
jae 0x180078938
mov eax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x28]
mov eax, dword [rcx + rax*8 + 0x1c]
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x28]
mov eax, dword [rcx + rax*8 + 0x20]
mov dword [rsp + 0x48], eax
mov eax, dword [rsp + 0x38]
shl eax, 0xb
add eax, dword [rsp + 0x48]
mov r8d, 2
mov edx, eax
mov rcx, qword [rsp + 0x88]
call fcn.18005fef0
mov rax, qword [rsp + 0x88]
add rax, 2
mov qword [rsp + 0x88], rax
jmp 0x1800788cc
mov rax, qword [rsp + 0x90]
mov ecx, dword [rsp + 0x34]
mov eax, dword [rax]
sub eax, ecx
mov rcx, qword [rsp + 0x90]
mov dword [rcx], eax
mov eax, 1
add rsp, 0x68
ret