Function at 0x180038300
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x80
lea eax, [rcx - 0xd]
mov rsi, r9
mov dword [rbp - 0x40], eax
mov rbx, r8
mov r15, rdx
cmp ecx, eax
jbe 0x180038904
lea r14d, [rcx - 0x55]
mov ecx, eax
mov dword [rbp + 0x40], r14d
lea r8, [0x180000000]
mov edi, dword [rbp + 0x40]
lea rdx, [0x180082424]
mov r13d, dword [rbp + 0x40]
mov r12d, dword [rbp + 0x40]
nop
cmp r14d, 0x1b
ja case.default.0x180038375
mov ecx, dword [r8 + r14*4 + 0x38924]
add rcx, r8
jmp rcx
mov edx, 0xa7
mov dword [rbp + 0x40], 6
lea rcx, [rbp + 0x40]
call fcn.180012320
movsxd rax, dword [rbx]
lea rdx, [0x180082424]
inc dword [rdx + rax*4]
jmp 0x1800388e5
mov edx, 0x30
mov byte [rbp + 0x40], 0
lea rcx, [rbp + 0x40]
call fcn.180013310
mov rax, qword [0x1800829d8]
mov ecx, dword [rsi]
mov dword [rax + 0x48], ecx
mov rax, qword [0x1800829d8]
mov qword [rax + 0x10], r15
jmp 0x1800388de
mov rax, qword [rbp + 0x68]
mov ecx, dword [rax]
mov rax, qword [0x1800829d8]
mov dword [rax + 0x30], ecx
mov ecx, dword [rbx]
mov rax, qword [0x1800829d8]
shl ecx, 0x10
add ecx, 0x8000
mov dword [rax + 0x24], ecx
jmp case.0x180038375.2
mov rsi, rdx
lea rax, [0x180082434]
xor ebx, ebx
cmp dword [rsi], ebx
jle 0x180038434
nop word [rax + rax]
mov r9d, 0x11b
lea r8, [rbp + 0x40]
lea rdx, [rbp + 0x40]
lea rcx, [rbp + 0x40]
call fcn.18000c470
inc ebx
cmp ebx, dword [rsi]
jl 0x180038410
lea rax, [0x180082434]
add rsi, 4
cmp rsi, rax
jl 0x180038400
mov rbx, qword [rbp + 0x50]
lea r8, [0x180000000]
mov rsi, qword [rbp + 0x58]
lea rdx, [0x180082424]
jmp case.0x180038375.2
mov r8, qword [0x1800829d8]
mov r9d, 0x109
xor edx, edx
xor ecx, ecx
call fcn.180045d90
mov rax, qword [0x1800829d8]
mov dword [rax + 0x20], 8
jmp 0x1800388de
xor edi, edi
jmp case.0x180038375.2
mov esi, dword [rbp - 0x28]
lea rdx, [rbp - 0x20]
mov ecx, 0xf
mov dword [rbp - 0x20], esi
call fcn.18005b850
mov edx, 4
mov dword [rbp - 0x20], r13d
lea rcx, [rbp - 0x20]
mov rbx, rax
call fcn.18005c450
mov r9d, esi
mov qword [rsp + 0x20], rbx
mov r8, rax
lea rcx, str.FoundryAsyncOp_AbortAllAsyncOpsForVM
mov edx, r13d
call fcn.18005dc40
cmp dword [0x1800823a0], 0
jne 0x18003843d
mov r14d, 0x14
mov dword [rbp - 0x38], r13d
lea rsi, [r15 + 4]
movzx edx, r13b
lea r8d, [r14 - 0x13]
nop
mov eax, r14d
sub eax, 0xc
je 0x18003854e
sub eax, 4
je 0x180038536
sub eax, 1
je 0x180038520
cmp eax, 3
jne 0x18003859f
mov ecx, dword [rbp - 0x38]
mov eax, ecx
sar eax, 8
sar ecx, 0x10
mov byte [rsi + 2], cl
mov byte [rsi], dl
mov byte [rsi + 1], al
jmp 0x18003859f
mov eax, dword [pe_dos_header]
add dword [rbp - 0x34], eax
mov eax, dword [pe_dos_header]
add dword [rbp - 0x30], eax
jmp 0x18003859f
mov eax, dword [rsi]
test al, 1
movzx edx, dl
cmovne edx, r8d
mov byte [rbp - 0x38], dl
test al, 2
je 0x18003859f
mov byte [rbp - 0x37], 1
jmp 0x18003859f
mov rbx, rsi
test rsi, rsi
je 0x18003859f
nop word [rax + rax]
mov rdx, qword [rbx + 0x10]
lea rcx, [rbp - 0x38]
xor r8d, r8d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fseeki64]
test eax, eax
jne 0x1800385ae
mov edx, dword [rbx + 0x18]
lea r9, [rbp - 0x38]
mov rcx, qword [rbx]
lea r8d, [rax + 1]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rax, 1
jne 0x1800385ae
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x180038560
movzx edx, byte [rbp - 0x38]
mov r8, rax
inc r14d
cmp r14d, 0x18
jb 0x1800384f0
jmp 0x1800385b6
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_perror]
mov eax, dword [rbp - 0x28]
lea rsi, [r15 + 7]
mov dword [rbp - 0x30], eax
movzx edx, al
mov r14d, 0x14
nop dword [rax]
mov eax, r14d
sub eax, 0xc
je 0x180038631
sub eax, 4
je 0x180038616
sub eax, 1
je 0x180038600
cmp eax, 3
jne 0x18003867c
mov ecx, dword [rbp - 0x30]
mov eax, ecx
sar eax, 8
sar ecx, 0x10
mov byte [rsi + 2], cl
mov byte [rsi], dl
mov byte [rsi + 1], al
jmp 0x18003867c
mov eax, dword [pe_dos_header]
add dword [rbp - 0x2c], eax
mov eax, dword [pe_dos_header]
add dword [rbp - 0x28], eax
jmp 0x18003867c
mov eax, dword [rsi]
mov ecx, 1
test al, 1
movzx edx, dl
cmovne edx, ecx
mov byte [rbp - 0x30], dl
test al, 2
je 0x18003867c
mov byte [rbp - 0x2f], cl
jmp 0x18003867c
mov rbx, rsi
test rsi, rsi
je 0x18003867c
nop dword [rax]
mov rdx, qword [rbx + 0x10]
lea rcx, [rbp - 0x30]
xor r8d, r8d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fseeki64]
test eax, eax
jne 0x180038692
mov edx, dword [rbx + 0x18]
lea r9, [rbp - 0x30]
mov rcx, qword [rbx]
lea r8d, [rax + 1]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rax, 1
jne 0x180038692
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x180038640
movzx edx, byte [rbp - 0x30]
inc r14d
cmp r14d, 0x18
jb 0x1800385d0
mov r14d, dword [rbp + 0x40]
jmp 0x18003843d
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_perror]
mov r14d, dword [rbp + 0x40]
jmp 0x18003843d
mov rax, qword [rbp + 0x68]
lea rcx, [r15 + 4]
mov r12d, 0x18
mov edx, 0x86
movzx eax, byte [rax + 1]
sub r12d, eax
call fcn.18004dc40
lea rcx, [r15 + 7]
mov edx, 0x86
mov r13d, eax
call fcn.18004dc40
mov dword [rbp - 0x28], eax
lea r8, [0x180000000]
lea rdx, [0x180082424]
jmp case.0x180038375.2
mov rax, qword [rbp + 0x68]
mov ecx, dword [rax]
mov rax, qword [0x1800829d8]
shl ecx, 0x10
add ecx, 0x8000
mov dword [rax + 0x28], ecx
jmp case.0x180038375.2
mov rdx, qword [0x1800829d8]
mov ecx, dword [rdx + 0x2c]
mov eax, dword [rdx + 0x30]
shl rcx, 6
add rcx, rax
mov qword [r8 + rcx*8 + 0x839e0], rdx
lea rdx, [0x180082424]
jmp case.0x180038375.2
mov ecx, dword [r15 + 4]
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_srand]
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
lea r8, [0x180000000]
lea rdx, [0x180082424]
lea ecx, [rax + 1]
mov rax, qword [0x1800829d8]
mov dword [rax + 4], ecx
mov rax, qword [0x1800829d8]
mov ecx, dword [rbx]
mov dword [rax + 0x2c], ecx
jmp case.0x180038375.2
mov esi, dword [rbp - 0x28]
lea rdx, [rbp + 0x40]
mov ecx, 0xf
mov dword [rbp + 0x40], esi
call fcn.18005b850
mov edx, 4
mov dword [rbp + 0x40], r13d
lea rcx, [rbp + 0x40]
mov rbx, rax
call fcn.18005c450
movzx edx, word [r15 + 0xc]
mov ecx, r12d
and edx, 0x7fff
mov r9d, esi
shl edx, cl
lea r8d, [rdx*2 + 1]
movzx edx, word [r15 + 0xa]
mov dword [rsp + 0x30], r8d
and edx, 0x7fff
shl edx, cl
mov r8, rax
lea ecx, [rdx*2 + 1]
mov edx, r13d
mov dword [rsp + 0x28], ecx
lea rcx, str.desc.Texture3D.ResourceMinLODClamp__resourceMinLODClamp_
mov qword [rsp + 0x20], rbx
call fcn.18005dc40
mov ebx, 0xd0
nop dword [rax + rax]
cmp ebx, 0xd0
je 0x180038895
cmp ebx, 0x167
je 0x18003887e
cmp ebx, 0x1fe
je 0x180038838
cmp ebx, 0x295
jne 0x1800388c1
mov eax, dword [rbp - 0x14]
add eax, dword [rbp - 0x10]
cdq
sub eax, edx
sar eax, 1
mov r13d, eax
mov eax, dword [rbp - 0x18]
add eax, dword [rbp - 0xc]
cdq
sub eax, edx
sar eax, 1
mov esi, eax
jmp 0x1800388c1
movzx eax, word [r15 + 0xc]
lea r9, [rbp + 0x40]
and eax, 0x7fff
mov dword [rbp + 0x40], 0
mov ecx, r12d
lea rdx, [rbp - 0x14]
shl eax, cl
mov r8d, 0x21
add eax, esi
lea rcx, [rbp - 0x10]
mov dword [rbp - 0x18], eax
lea rax, [rbp - 0xc]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x18]
mov qword [rsp + 0x20], rax
call fcn.180059f80
jmp 0x1800388c1
movzx eax, word [r15 + 0xa]
mov ecx, r12d
and eax, 0x7fff
shl eax, cl
add eax, r13d
mov dword [rbp - 0x14], eax
jmp 0x1800388c1
movzx edx, word [r15 + 0xa]
mov ecx, r12d
and edx, 0x7fff
mov eax, r13d
shl edx, cl
sub eax, edx
movzx edx, word [r15 + 0xc]
and edx, 0x7fff
mov dword [rbp - 0x10], eax
shl edx, cl
mov eax, esi
sub eax, edx
mov dword [rbp - 0xc], eax
add ebx, 0x97
cmp ebx, 0x32c
jb 0x1800387f0
mov rbx, qword [rbp + 0x50]
mov dword [rbp - 0x28], esi
mov rsi, qword [rbp + 0x58]
lea rdx, [0x180082424]
lea r8, [0x180000000]
mov ecx, dword [rbp - 0x40]
dec r14d
mov dword [rbp + 0x40], r14d
lea eax, [r14 + 0x55]
cmp eax, ecx
ja 0x180038360
jmp case.0x180038375.10
mov edi, dword [rbp + 0x40]
mov rbx, qword [rsp + 0xc8]
mov eax, edi
add rsp, 0x80
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret