Function at 0x180160040
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r12
push r14
lea rbp, [rsp - 0x80]
sub rsp, 0x180
mov rax, qword [0x1802a8300]
xor rax, rsp
mov qword [rbp + 0x70], rax
xor r12d, r12d
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x20], r12d
xor r9d, r9d
lea r8, [0x1800f5e60]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
xorps xmm0, xmm0
movups xmmword [rbp + 0x50], xmm0
mov eax, dword [0x1802b53fc]
cmp eax, 0x1a8
jge 0x1801600b3
lea rdx, str.open_Athena_Terrain
movzx eax, word [str.open_Athena_Terrain]
jmp 0x1801600ef
cmp eax, 0x1f4
jl 0x1801600d3
cmp eax, 0x1f5
jl 0x1801600ca
lea rdx, str.open_Asteria_Terrain
jmp 0x1801600ec
lea rdx, str.open_Artemis_Terrain
jmp 0x1801600da
lea rdx, str.open_Apollo_Terrain
cmp byte [0x1802b58c2], r12b
lea rax, str.open_Creative_NoApollo_Terrain
cmovne rdx, rax
movzx eax, word [rdx]
mov qword [rbp + 0x50], r12
mov rsi, 0xffffffffffffffff
test ax, ax
je 0x180160122
mov rcx, rsi
inc rcx
cmp word [rdx + rcx*2], r12w
jne 0x180160102
add ecx, 1
mov dword [rbp + 0x58], ecx
mov dword [rbp + 0x5c], ecx
mov rax, r12
cmovne rax, rdx
mov qword [rbp + 0x50], rax
jmp 0x180160126
mov qword [rbp + 0x58], r12
mov ecx, dword [0x1802b3c40]
mov rax, qword gs:[0x58]
mov edx, 8
mov rax, qword [rax + rcx*8]
mov ecx, dword [rdx + rax]
cmp dword [0x1802b89d8], ecx
jle 0x180160188
lea rcx, [0x1802b89d8]
call fcn.1801ea940
cmp dword [0x1802b89d8], 0xffffffff
jne 0x180160188
mov rax, qword [0x1802b53a0]
xor r9d, r9d
lea r8, str._Script_FortniteGame.FortOnlineBeaconHost
xor edx, edx
xor ecx, ecx
call rax
mov qword [0x1802b88d0], rax
lea rcx, [0x1802b89d8]
call fcn.1801ea8d4
xorps xmm0, xmm0
movups xmmword [rbp + 0x60], xmm0
mov rbx, qword [0x1802b88d0]
call fcn.18015df10
mov r8, rbx
mov rdx, rax
lea rcx, [rbp + 0x60]
call fcn.1801806c0
movsxd r14, dword [rbp + 0x68]
test r14d, r14d
jle 0x1801601d2
mov rbx, qword [rbp + 0x60]
mov edi, r14d
nop word [rax + rax]
mov rcx, qword [rbx]
call fcn.180088420
lea rbx, [rbx + 8]
sub rdi, 1
jne 0x1801601c0
cmp qword [rbp + 0x60], 0
je 0x1801601f5
test r14d, r14d
jle 0x1801601f5
mov rdx, r14
shl rdx, 3
mov r8d, 0x8000
mov rcx, qword [rbp + 0x60]
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov byte [0x1802b5c63], 0
mov byte [0x1802b5c62], 0
mov byte [0x1802b5934], 0
inc dword [0x1802b5ed0]
xorps xmm0, xmm0
movups xmmword [rbp - 0x40], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x30], xmm1
mov r8d, 6
lea rdx, str.LogDev
lea rcx, [rbp - 0x40]
call fcn.180062b90
nop
call fcn.180062930
lea r8, [rbp - 0x40]
lea rdx, [rsp + 0x30]
mov rcx, rax
call fcn.180062830
cmp qword [rsp + 0x30], 0
setne dil
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x180160291
mov eax, esi
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x180160291
mov rbx, qword [rsp + 0x38]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
mov eax, esi
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x180160291
mov rcx, qword [rsp + 0x38]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
nop
lea rcx, [rbp - 0x40]
call fcn.1800668c0
test dil, dil
je 0x1801603cd
xorps xmm0, xmm0
movups xmmword [rbp - 0x20], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x10], xmm1
mov r8d, 6
lea rdx, str.LogDev
lea rcx, [rbp - 0x20]
call fcn.180062b90
nop
call fcn.180062930
lea r8, [rbp - 0x20]
lea rdx, [rsp + 0x40]
mov rcx, rax
call fcn.180062830
nop
mov qword [rsp + 0x70], r12
mov qword [rsp + 0x78], r12
lea rax, str.Switching_
mov qword [rbp - 0x80], rax
mov qword [rbp - 0x78], 0xa
movaps xmm0, xmmword [rsp + 0x70]
movdqa xmmword [rbp], xmm0
movaps xmm1, xmmword [rbp - 0x80]
movdqa xmmword [rbp + 0x10], xmm1
lea r8, [rbp]
lea rdx, [rbp + 0x10]
lea rcx, [rbp - 0x60]
call fcn.180073b00
nop
lea rax, [rbp - 0x60]
cmp qword [rbp - 0x48], 0xf
cmova rax, qword [rbp - 0x60]
mov qword [rbp - 0x70], rax
mov rax, qword [rbp - 0x50]
mov qword [rbp - 0x68], rax
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x58], r12
mov qword [rsp + 0x68], r12
movaps xmm0, xmmword [rbp - 0x70]
movdqa xmmword [rbp + 0x20], xmm0
movups xmm1, xmmword [rsp + 0x58]
movaps xmmword [rbp + 0x30], xmm1
movsd xmm0, qword [rsp + 0x68]
movsd qword [rbp + 0x40], xmm0
lea r9, [rbp + 0x20]
mov r8d, 2
lea rdx, [rbp + 0x30]
mov rcx, qword [rsp + 0x40]
call fcn.180060510
nop
lea rcx, [rbp - 0x60]
call fcn.1800668c0
nop
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x1801603c4
mov eax, esi
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x1801603c4
mov rbx, qword [rsp + 0x48]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
lock xadd dword [rbx + 0xc], esi
cmp esi, 1
jne 0x1801603c4
mov rcx, qword [rsp + 0x48]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
nop
lea rcx, [rbp - 0x20]
call fcn.1800668c0
movsd xmm0, qword [0x1802b5088]
comisd xmm0, xmmword [0x180274d80]
jb 0x1801603f6
call fcn.18015df10
mov rcx, rax
call fcn.1800b0ba0
mov rcx, qword [rax]
call fcn.18017c4f0
jmp 0x180160408
call fcn.18015df10
mov rcx, rax
lea rdx, [rbp + 0x50]
call fcn.1800b7b10
nop
mov rcx, qword [rbp + 0x70]
xor rcx, rsp
call fcn.1801ea730
lea r11, [rsp + 0x180]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop r12
pop rbp
ret