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

Disassembly:
push rbx
push r15
sub rsp, 0x28
mov qword [rsp + 0x48], rsi
mov rbx, rcx
mov qword [rsp + 0x50], rdi
mov r15, rdx
movsxd rdi, dword [rdx + 0xc]
mov qword [rsp + 0x20], r14
movsxd r14, dword [rdx + 8]
shl r14, 4
add r14, qword [rcx + 0x50]
mov ecx, 0xb90
call qword [0x180170e20]
cmp dword [rbx + 0x84], 0xff
je 0x18003c8a9
mov ecx, 0xff
mov dword [rbx + 0x84], 0xff
call qword [0x180170e60]
cmp dword [rbx + 0x88], 0x207
jne 0x18003c8ca
cmp dword [rbx + 0x8c], 0
jne 0x18003c8ca
cmp dword [rbx + 0x90], 0xff
je 0x18003c8f2
xor edx, edx
mov qword [rbx + 0x88], 0x207
mov ecx, 0x207
mov dword [rbx + 0x90], 0xff
mov r8d, 0xff
call qword [0x180170ee8]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [0x180170eb8]
movsxd r8, dword [r15 + 0x18]
mov edx, 0xb
add r8, qword [rbx + 0x70]
mov ecx, dword [rbx + 0x14]
call qword [0x180170e00]
mov r8d, dword [rbx + 0x28]
xor ecx, ecx
test r8d, r8d
jle 0x18003c943
mov r9, qword [rbx + 0x18]
mov edx, dword [rbx + 0xa4]
mov rax, r9
cmp dword [rax], edx
je 0x18003cb86
inc ecx
add rax, 0x18
cmp ecx, r8d
jl 0x18003c930
xor edx, edx
cmp dword [rbx + 0x80], edx
je 0x18003c95e
mov ecx, 0xde1
mov dword [rbx + 0x80], edx
call qword [0x180170f70]
test byte [rbx + 0x3c], 4
je 0x18003c9a8
call qword [0x180170e58]
test eax, eax
je 0x18003c983
lea r8, str.tex_paint_tex
mov edx, eax
lea rcx, str.Error__08x_after__s_n
call fcn.180033780
test byte [rbx + 0x3c], 4
je 0x18003c9a8
call qword [0x180170e58]
test eax, eax
je 0x18003c9a8
lea r8, str.fill_simple
mov edx, eax
lea rcx, str.Error__08x_after__s_n
call fcn.180033780
mov edx, 0x1e00
mov ecx, 0x404
mov r8d, edx
mov r9d, 0x8507
call qword [0x180170fb0]
mov edx, 0x1e00
mov ecx, 0x405
mov r8d, edx
mov r9d, 0x8508
call qword [0x180170fb0]
mov ecx, 0xb44
call qword [0x180170ea8]
mov rsi, rdi
test edi, edi
jle 0x18003ca20
mov qword [rsp + 0x40], rbp
mov rdi, r14
mov rbp, rsi
nop word [rax + rax]
mov r8d, dword [rdi + 4]
mov ecx, 6
mov edx, dword [rdi]
call qword [0x180170e28]
lea rdi, [rdi + 0x10]
sub rbp, 1
jne 0x18003ca00
mov rbp, qword [rsp + 0x40]
mov ecx, 0xb44
call qword [0x180170e20]
mov r9b, 1
movzx r8d, r9b
movzx edx, r9b
movzx ecx, r9b
call qword [0x180170eb8]
mov edx, dword [rbx + 0x38]
mov rcx, rbx
add edx, dword [r15 + 0x18]
mov r8d, dword [r15 + 4]
call fcn.18003c750
test byte [rbx + 0x3c], 4
je 0x18003ca78
call qword [0x180170e58]
test eax, eax
je 0x18003ca78
lea r8, str.fill_fill
mov edx, eax
lea rcx, str.Error__08x_after__s_n
call fcn.180033780
test byte [rbx + 0x3c], 1
je 0x18003cafb
cmp dword [rbx + 0x88], 0x202
jne 0x18003ca9f
cmp dword [rbx + 0x8c], 0
jne 0x18003ca9f
cmp dword [rbx + 0x90], 0xff
je 0x18003cac7
xor edx, edx
mov qword [rbx + 0x88], 0x202
mov ecx, 0x202
mov dword [rbx + 0x90], 0xff
mov r8d, 0xff
call qword [0x180170ee8]
mov edx, 0x1e00
mov ecx, edx
mov r8d, edx
call qword [0x180170e70]
test rsi, rsi
jle 0x18003cafb
lea rdi, [r14 + 8]
mov r8d, dword [rdi + 4]
mov ecx, 5
mov edx, dword [rdi]
call qword [0x180170e28]
lea rdi, [rdi + 0x10]
sub rsi, 1
jne 0x18003cae0
cmp dword [rbx + 0x88], 0x205
mov r14, qword [rsp + 0x20]
mov rdi, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x48]
jne 0x18003cb2b
cmp dword [rbx + 0x8c], 0
jne 0x18003cb2b
cmp dword [rbx + 0x90], 0xff
je 0x18003cb53
xor edx, edx
mov qword [rbx + 0x88], 0x205
mov ecx, 0x205
mov dword [rbx + 0x90], 0xff
mov r8d, 0xff
call qword [0x180170ee8]
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [0x180170e70]
mov r8d, dword [r15 + 0x14]
mov ecx, 5
mov edx, dword [r15 + 0x10]
call qword [0x180170e28]
mov ecx, 0xb90
add rsp, 0x28
pop r15
pop rbx
jmp qword [0x180170ea8]
movsxd rax, ecx
lea rcx, [rax + rax*2]
lea rdx, [r9 + rcx*8]
test rdx, rdx
je 0x18003c943
mov edx, dword [rdx + 4]
jmp 0x18003c945