Function at 0x1800317c0
Capabilities:
Check for time delay via gettickcount

Disassembly:
sub rsp, 0x28
cmp dword [0x1804212a0], 0
je 0x18002211b
xor edx, edx
lea rcx, [0x180041440]
call fcn.180016ad0
mov eax, dword [0x180421288]
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x20], rdi
mov byte [0x18041f0fb], 0
cmp eax, 1
je 0x180022381
cmp qword [0x180421260], 0
je 0x18002218c
mov rcx, qword [0x18041e690]
mov r8, qword [0x180421258]
mov rdx, qword [rcx]
mov rax, qword [rcx + 0x10]
sub rax, rdx
cmp rax, r8
jb 0x180022361
add rdx, r8
xor r8d, r8d
call fcn.1800348d0
test eax, eax
je 0x180022361
cmp byte [0x18041f0fb], 0
jne 0x180022361
mov eax, dword [0x180421288]
test eax, eax
jne 0x180022358
cmp dword [0x1804212a0], eax
jne 0x180022358
cmp qword [0x180421268], 0
je 0x180022358
xor edi, edi
mov dword [0x18041e934], 1
mov qword [0x1804212b0], rdi
call fcn.180030b40
test eax, eax
jne 0x180022228
mov rbx, qword [0x180412018]
test rbx, rbx
je 0x18002221e
nop word [rax + rax]
mov rdx, qword [rbx]
mov rax, qword [rbx + 0x10]
mov rcx, qword [0x1804212a8]
sub rax, rdx
cmp rax, rcx
jb 0x180022211
add rdx, rcx
xor r8d, r8d
mov rcx, rbx
mov edi, 1
call fcn.1800348d0
test eax, eax
je 0x180022361
mov rbx, qword [rbx + 0x30]
test rbx, rbx
jne 0x1800221e0
test edi, edi
jne 0x180022228
mov dword [0x18041e934], 2
cmp byte [0x18041f0fb], 0
jne 0x180022361
mov eax, dword [0x180421288]
test eax, eax
jne 0x180022358
cmp dword [0x18041e934], 2
jne 0x18002232d
mov rcx, qword [0x18041eab0]
xor edx, edx
mov r8, qword [0x1804212a8]
add r8, 0x1030
add r8, rcx
mov rax, r8
div rcx
sub r8, rdx
mov edx, 1
cmp rcx, r8
cmovbe rcx, r8
add rcx, 0xfff
and rcx, 0xfffffffffffff000
call fcn.180033920
mov rbx, rax
test rax, rax
je 0x180022319
mov rdi, qword [rax + 0x10]
or qword [rax + 0x28], 8
mov qword [rsp + 0x38], rsi
mov rsi, qword [rax + 0x20]
mov eax, dword [0x18041d330]
sub rdi, rsi
cmp eax, 4
jl 0x1800222df
mov eax, dword [0x18041d328]
test al, 1
je 0x1800222df
call fcn.18000c1f0
mov r9d, 1
mov r8, rdi
mov rdx, rsi
mov rcx, rax
mov r10, qword [rax]
call qword [r10 + 0x28]
mov rdx, rbx
mov ecx, 3
call fcn.180044180
mov r9, qword [rbx + 0x10]
mov ecx, 3
mov r8, qword [rbx]
mov rdx, qword [rbx + 0x20]
call fcn.180006300
mov eax, dword [0x180421288]
mov rsi, qword [rsp + 0x38]
mov qword [0x1804212b0], rbx
test eax, eax
je 0x180022334
jmp 0x180022358
mov eax, 1
mov qword [0x1804212b0], rbx
mov dword [0x180421288], eax
jmp 0x180022358
mov rbx, qword [0x1804212b0]
test rbx, rbx
je 0x180022358
mov rdx, qword [rbx]
xor r8d, r8d
add rdx, qword [0x1804212a8]
mov rcx, rbx
call fcn.1800348d0
test eax, eax
je 0x180022361
mov eax, dword [0x180421288]
cmp byte [0x18041f0fb], 0
je 0x180022381
mov dword [0x180421288], 1
mov byte [0x18041f0fb], 0
mov rdi, qword [rsp + 0x20]
mov rbx, qword [rsp + 0x30]
add rsp, 0x28
ret
test eax, eax
jne 0x1800223ce
cmp qword [0x180421268], 0
je 0x1800223a4
mov rcx, qword [0x1804212a8]
mov qword [0x180421510], rcx
mov qword [0x180421518], rcx
cmp qword [0x180421260], 0
je 0x1800223c3
mov rax, qword [0x180421258]
mov qword [0x180421300], rax
mov qword [0x180421308], rax
mov qword [0x180421270], 1
mov rdi, qword [rsp + 0x20]
mov rbx, qword [rsp + 0x30]
add rsp, 0x28
ret
sub rsp, 0x58
mov qword [rsp + 0x70], rbp
lea rdx, [rsp + 0x20]
mov qword [rsp + 0x48], r12
mov ebp, ecx
mov qword [rsp + 0x30], r15
lea rcx, [0x180031330]
xor r15d, r15d
mov r12d, 1
mov qword [0x180421250], r15
mov qword [rsp + 0x28], r15
mov dword [rsp + 0x20], r12d
call fcn.180016ad0
mov rdx, qword [0x18041e690]
mov rax, qword [0x18041e688]
mov qword [rdx], rax
cmp dword [0x180422af0], 4
jne 0x180031855
cmp dword [0x1804212a0], r15d
je 0x180031855
call fcn.180030350
mov ecx, dword [0x180421288]
test eax, eax
mov dword [0x180422ab8], 2
cmove ecx, r12d
mov dword [0x180421288], ecx
call fcn.180045110
inc qword [0x180421880]
jmp 0x180031f60
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x78], rsi
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x38], r14
call fcn.1800358b0
mov rdi, qword [0x18041e920]
mov eax, dword [reloc.WS2_32.dll_closesocket]
mov dword [0x180422aec], eax
mov qword [0x18041eb40], r15
mov rbx, qword [rdi + 0x18]
test rbx, rbx
je 0x1800318b3
nop word [rax + rax]
mov rcx, rbx
mov rdx, r12
mov rbx, qword [rbx]
call fcn.180063e00
test rbx, rbx
jne 0x1800318a0
mov qword [rdi + 0x18], r15
mov rax, qword [0x18041e900]
cmp qword [0x18041d350], rax
je 0x1800318cc
call fcn.18002cb30
call fcn.18003f880
lea r14, [0x180412008]
lea r13, [0x180412228]
nop
mov rbx, qword [r14]
test rbx, rbx
je 0x1800318ff
test byte [rbx + 0x28], r12b
je 0x1800318ff
nop
mov rbx, qword [rbx + 0x30]
test rbx, rbx
je 0x1800318ff
test byte [rbx + 0x28], r12b
jne 0x1800318f0
mov rsi, r15
test rbx, rbx
je 0x180031944
nop word [rax + rax]
mov eax, dword [rbx + 0x28]
mov rdi, qword [rbx + 0x30]
bt rax, 8
jae 0x180031939
call fcn.18001a110
test al, al
mov edx, r15d
mov rcx, rbx
setne dl
call fcn.18002dfd0
mov qword [rsi + 0x30], rdi
jmp 0x18003193c
mov rsi, rbx
mov rbx, rdi
test rdi, rdi
jne 0x180031910
add r14, 0x110
cmp r14, r13
jl 0x1800318e0
mov eax, dword [0x1804220ec]
mov r14, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x78]
test eax, eax
jne 0x180031969
call fcn.18003f6a0
xor r9d, r9d
lea r8, [0x180421898]
lea rdx, [0x180421c5c]
mov ecx, ebp
call fcn.180032cd0
mov edx, dword [0x180421c5c]
lea r9, [rsp + 0x68]
mov ecx, dword [0x180421898]
mov r8d, eax
mov dword [rsp + 0x68], edx
mov edx, ebp
mov dword [0x180422ab8], eax
call fcn.180036e20
cmp dword [0x18041c5d4], 4
movsxd r8, eax
mov dword [0x180422ab8], r8d
jb 0x1800319d7
mov r9, r8
mov edx, r12d
lea r8, str.condemned_generation_num:__d_n
mov ecx, recv
call fcn.180011ef0
mov r8d, dword [0x180422ab8]
cmp qword [0x180421270], r15
mov ecx, dword [0x180422aec]
je 0x180031a03
inc qword [0x180421278]
cmp ecx, 0x11
ja 0x180031a03
mov eax, 0x22e86
bt eax, ecx
jae 0x180031a03
inc qword [0x180421280]
mov eax, dword [0x180422abc]
cmp r8d, r12d
cmovg eax, r12d
cmp ecx, r12d
mov ecx, r8d
mov dword [0x180422abc], eax
sete dl
call fcn.180006300
mov ecx, dword [0x180422ab8]
cmp ecx, 2
jne 0x180031a97
cmp dword [rsp + 0x68], r15d
jne 0x180031a97
cmp byte [0x18041f0f8], r15b
je 0x180031a97
cmp byte [0x18041f0f9], r15b
jne 0x180031a97
mov eax, dword [0x180422af0]
dec eax
test eax, 0xfffffffd
jne 0x180031a97
mov eax, r12d
mov dword [0x18041eb7c], r12d
xchg dword [0x180422acc], eax
movups xmm0, xmmword [0x18041e998]
mov ecx, dword [0x180422ab8]
movups xmm1, xmmword [0x18041e9a8]
movups xmmword [0x18041eeb0], xmm0
movups xmm0, xmmword [0x18041e9b8]
movups xmmword [0x18041eec0], xmm1
movups xmmword [0x18041eed0], xmm0
mov edx, dword [0x180421358]
inc edx
mov qword [0x180422ab0], rdx
mov edx, 2
call fcn.18000c500
call fcn.18002f520
lea rcx, str.BEGIN
call fcn.18002e230
call fcn.18001a0d0
test r12b, al
je 0x180031adc
call fcn.18001a0d0
test al, 0x40
jne 0x180031adc
mov ecx, r12d
call fcn.180045510
call fcn.18001a0d0
cmp dword [0x180422acc], r15d
je 0x180031f29
movaps xmm0, xmmword [0x180422ab0]
lea rcx, [0x18041f0d0]
movaps xmmword [0x180422580], xmm0
movaps xmm0, xmmword [0x180422ad0]
movaps xmmword [0x1804225a0], xmm0
movaps xmm0, xmmword [0x180422af0]
mov dword [0x180422ac0], r15d
movaps xmm1, xmmword [0x180422ac0]
movaps xmmword [0x180422590], xmm1
movaps xmm1, xmmword [0x180422ae0]
movaps xmmword [0x1804225c0], xmm0
movsd xmm0, qword [0x180422b10]
movaps xmmword [0x1804225b0], xmm1
movaps xmm1, xmmword [0x180422b00]
movsd qword [0x1804225e0], xmm0
movaps xmmword [0x1804225d0], xmm1
call sub.KERNEL32.dll_EnterCriticalSection
cmp dword [0x18041eb78], r15d
jne 0x180031bcf
cmp qword [0x18041f0c8], r15
jne 0x180031bcf
lea r9, str..NET_BGC
movzx r8d, r12b
xor edx, edx
lea rcx, [0x180028a70]
call fcn.18000beb0
movzx eax, al
mov dword [0x18041eb78], eax
test eax, eax
je 0x180031bcf
lea rcx, [0x18041f0d0]
call sub.KERNEL32.dll_LeaveCriticalSection
mov eax, dword [0x18041d330]
cmp eax, 4
jl 0x180031bdb
mov eax, dword [0x18041d328]
test r12b, al
je 0x180031bdb
call fcn.18000c1f0
mov rcx, rax
mov rdx, qword [rax]
call qword [rdx + 0x38]
jmp 0x180031bdb
lea rcx, [0x18041f0d0]
call sub.KERNEL32.dll_LeaveCriticalSection
cmp qword [0x18041f0c8], r15
mov dword [0x18041f100], r12d
mov dword [0x18041f0fc], r15d
je 0x180031dcb
lea rdi, [0x180411ef8]
nop dword [rax]
mov rbx, qword [rdi]
test rbx, rbx
je 0x180031d00
movzx eax, byte [rbx + 0x28]
and al, 3
cmp al, r12b
jne 0x180031c38
nop word [rax + rax]
mov rbx, qword [rbx + 0x30]
test rbx, rbx
je 0x180031d00
movzx eax, byte [rbx + 0x28]
and al, 3
cmp al, r12b
je 0x180031c20
test rbx, rbx
je 0x180031d00
mov rax, qword [rbx + 0x28]
test al, 0x40
jne 0x180031cf3
test r12b, al
je 0x180031cc3
mov rcx, qword [rbx + 0x20]
lea rdx, [rbx + 0x10]
mov rax, qword [0x18041ead0]
mov r8, qword [0x18041ead8]
cmp rcx, rax
jb 0x180031c98
mov r9, qword [rdx]
cmp r9, r8
ja 0x180031c93
mov r8, qword [0x18041e910]
mov rdx, r9
call fcn.18002b390
test eax, eax
je 0x180031dcb
or qword [rbx + 0x28], 0x40
jmp 0x180031cf3
cmp rax, rcx
jbe 0x180031c9b
mov rcx, rax
mov rdx, qword [rdx]
cmp r8, rdx
cmovb rdx, r8
mov r8, qword [0x18041e910]
call fcn.18002b390
test eax, eax
je 0x180031dcb
or qword [rbx + 0x28], 0x80
jmp 0x180031cf3
mov r8, qword [0x18041e910]
mov rcx, rbx
mov rdx, qword [rbx + 0x10]
call fcn.18002b390
test eax, eax
je 0x180031dcb
mov rax, qword [rbx + 0x28]
test al, al
jns 0x180031ceb
btr rax, 7
or rax, 0x40
mov qword [rbx + 0x28], rax
mov rbx, qword [rbx + 0x30]
test rbx, rbx
jne 0x180031c41
add rdi, 0x110
cmp rdi, r13
jl 0x180031c00
mov rax, qword [0x18041ead0]
mov ebx, 0xffffffff
cmp dword [0x180422aec], 5
mov qword [0x1804211e0], rax
mov rax, qword [0x18041ead8]
cmove ebx, r12d
mov qword [0x1804211e8], rax
mov dword [0x18041f100], r12d
mov dword [0x180422b18], r12d
je 0x180031d72
mov ecx, r15d
lea rdx, [0x180421300]
cmp qword [rdx], r15
jg 0x180031d72
cmp ebx, ecx
mov eax, ecx
cmovg eax, ebx
inc ecx
add rdx, 0xb0
mov ebx, eax
cmp ecx, 2
jl 0x180031d56
mov dword [0x18041e680], r12d
cmp ebx, 0xffffffff
jne 0x180031d8b
xorps xmm0, xmm0
movdqa xmmword [0x180411ca0], xmm0
jmp 0x180031dbb
lea rcx, [0x180422ab0]
mov dword [0x18041f0fc], r12d
call fcn.180035850
mov rax, qword [0x180421358]
add rax, 2
mov dword [0x180422ab8], ebx
mov qword [0x180422ab0], rax
call fcn.18002f520
cmp dword [0x18041f0fc], r15d
jne 0x180031de2
call fcn.18002ea80
jmp 0x180031de2
mov eax, r15d
mov dword [0x18041f100], r15d
mov dword [0x180422ac0], r12d
xchg dword [0x180422acc], eax
cmp dword [0x18041f100], r15d
je 0x180031f29
lea rcx, [0x18041eee0]
mov edx, 3
lea rax, [0x180421670]
lea rcx, [rcx + 0x80]
movups xmm0, xmmword [rax]
movups xmm1, xmmword [rax + 0x10]
lea rax, [rax + 0x80]
movups xmmword [rcx - 0x80], xmm0
movups xmm0, xmmword [rax - 0x60]
movups xmmword [rcx - 0x70], xmm1
movups xmm1, xmmword [rax - 0x50]
movups xmmword [rcx - 0x60], xmm0
movups xmm0, xmmword [rax - 0x40]
movups xmmword [rcx - 0x50], xmm1
movups xmm1, xmmword [rax - 0x30]
movups xmmword [rcx - 0x40], xmm0
movups xmm0, xmmword [rax - 0x20]
movups xmmword [rcx - 0x30], xmm1
movups xmm1, xmmword [rax - 0x10]
movups xmmword [rcx - 0x20], xmm0
movups xmmword [rcx - 0x10], xmm1
sub rdx, r12
jne 0x180031e02
cmp dword [0x18041f0fc], r15d
movups xmm0, xmmword [rax]
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rcx], xmm0
movups xmm0, xmmword [rax + 0x20]
movups xmmword [rcx + 0x10], xmm1
movups xmm1, xmmword [rax + 0x30]
movups xmmword [rcx + 0x20], xmm0
movups xmm0, xmmword [rax + 0x40]
movups xmmword [rcx + 0x30], xmm1
movups xmm1, xmmword [rax + 0x50]
mov rax, qword [rax + 0x60]
movups xmmword [rcx + 0x40], xmm0
movups xmmword [rcx + 0x50], xmm1
mov qword [rcx + 0x60], rax
je 0x180031f2e
mov dword [0x18041e958], r15d
mov dword [0x18041e95c], 0x8000
mov dword [0x180421838], r15d
mov dword [0x18042183c], 0x8000
call fcn.180031f90
movaps xmm0, xmmword [0x180422580]
movaps xmm1, xmmword [0x180422590]
movaps xmmword [0x180422ab0], xmm0
movaps xmm0, xmmword [0x1804225a0]
movaps xmmword [0x180422ad0], xmm0
movaps xmm0, xmmword [0x1804225c0]
movaps xmmword [0x180422ac0], xmm1
movaps xmm1, xmmword [0x1804225b0]
movaps xmmword [0x180422af0], xmm0
movsd xmm0, qword [0x1804225e0]
movaps xmmword [0x180422ae0], xmm1
movaps xmm1, xmmword [0x1804225d0]
movsd qword [0x180422b10], xmm0
movaps xmmword [0x180422b00], xmm1
call fcn.18002ea80
jmp 0x180031f2e
call fcn.180031f90
call sub.KERNEL32.dll_GetTickCount
mov r13, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x60]
mov eax, eax
mov qword [0x18041e988], rax
mov rax, qword [0x180421300]
mov qword [0x18041e990], rax
mov qword [0x18041e938], rax
cmp dword [0x180422af0], 4
mov r15, qword [rsp + 0x30]
mov r12, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x70]
jne 0x180031f81
add rsp, 0x58
jmp 0x180022100
add rsp, 0x58
ret