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

Disassembly:
sub rsp, 0x28
cmp dword [0x18041dd40], 0
je 0x18002273b
xor edx, edx
lea rcx, [0x180041b60]
call fcn.180017090
mov eax, dword [0x18041dd28]
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x20], rdi
mov byte [0x18041bb9b], 0
cmp eax, 1
je 0x1800229a1
cmp qword [0x18041dd00], 0
je 0x1800227ac
mov rcx, qword [0x18041b130]
mov r8, qword [0x18041dcf8]
mov rdx, qword [rcx]
mov rax, qword [rcx + 0x10]
sub rax, rdx
cmp rax, r8
jb 0x180022981
add rdx, r8
xor r8d, r8d
call fcn.180034ee0
test eax, eax
je 0x180022981
cmp byte [0x18041bb9b], 0
jne 0x180022981
mov eax, dword [0x18041dd28]
test eax, eax
jne 0x180022978
cmp dword [0x18041dd40], eax
jne 0x180022978
cmp qword [0x18041dd08], 0
je 0x180022978
xor edi, edi
mov dword [0x18041b3d4], 1
mov qword [0x18041dd50], rdi
call fcn.180031160
test eax, eax
jne 0x180022848
mov rbx, qword [0x18040eb68]
test rbx, rbx
je 0x18002283e
nop word [rax + rax]
mov rdx, qword [rbx]
mov rax, qword [rbx + 0x10]
mov rcx, qword [0x18041dd48]
sub rax, rdx
cmp rax, rcx
jb 0x180022831
add rdx, rcx
xor r8d, r8d
mov rcx, rbx
mov edi, 1
call fcn.180034ee0
test eax, eax
je 0x180022981
mov rbx, qword [rbx + 0x30]
test rbx, rbx
jne 0x180022800
test edi, edi
jne 0x180022848
mov dword [0x18041b3d4], 2
cmp byte [0x18041bb9b], 0
jne 0x180022981
mov eax, dword [0x18041dd28]
test eax, eax
jne 0x180022978
cmp dword [0x18041b3d4], 2
jne 0x18002294d
mov rcx, qword [0x18041b550]
xor edx, edx
mov r8, qword [0x18041dd48]
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.180033f30
mov rbx, rax
test rax, rax
je 0x180022939
mov rdi, qword [rax + 0x10]
or qword [rax + 0x28], 8
mov qword [rsp + 0x38], rsi
mov rsi, qword [rax + 0x20]
mov eax, dword [0x180419dd0]
sub rdi, rsi
cmp eax, 4
jl 0x1800228ff
mov eax, dword [0x180419dc8]
test al, 1
je 0x1800228ff
call fcn.18000c6d0
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.1800448b0
mov r9, qword [rbx + 0x10]
mov ecx, 3
mov r8, qword [rbx]
mov rdx, qword [rbx + 0x20]
call fcn.180006cb0
mov eax, dword [0x18041dd28]
mov rsi, qword [rsp + 0x38]
mov qword [0x18041dd50], rbx
test eax, eax
je 0x180022954
jmp 0x180022978
mov eax, 1
mov qword [0x18041dd50], rbx
mov dword [0x18041dd28], eax
jmp 0x180022978
mov rbx, qword [0x18041dd50]
test rbx, rbx
je 0x180022978
mov rdx, qword [rbx]
xor r8d, r8d
add rdx, qword [0x18041dd48]
mov rcx, rbx
call fcn.180034ee0
test eax, eax
je 0x180022981
mov eax, dword [0x18041dd28]
cmp byte [0x18041bb9b], 0
je 0x1800229a1
mov dword [0x18041dd28], 1
mov byte [0x18041bb9b], 0
mov rdi, qword [rsp + 0x20]
mov rbx, qword [rsp + 0x30]
add rsp, 0x28
ret
test eax, eax
jne 0x1800229ee
cmp qword [0x18041dd08], 0
je 0x1800229c4
mov rcx, qword [0x18041dd48]
mov qword [0x18041dfb0], rcx
mov qword [0x18041dfb8], rcx
cmp qword [0x18041dd00], 0
je 0x1800229e3
mov rax, qword [0x18041dcf8]
mov qword [0x18041dda0], rax
mov qword [0x18041dda8], rax
mov qword [0x18041dd10], 1
mov rdi, qword [rsp + 0x20]
mov rbx, qword [rsp + 0x30]
add rsp, 0x28
ret
mov rax, rsp
sub rsp, 0x58
mov qword [rax + 0x18], rbp
lea rdx, [rax - 0x38]
mov qword [rax - 0x10], r12
mov ebp, ecx
mov qword [rax - 0x18], r13
lea rcx, [0x180031950]
xor r12d, r12d
mov qword [rax - 0x28], r15
mov r15d, dword [0x18041f590]
mov r13d, 1
mov dword [rax - 0x38], r13d
mov qword [0x18041dcf0], r12
mov qword [rax - 0x30], r12
call fcn.180017090
mov rdx, qword [0x18041b130]
mov rax, qword [0x18041b128]
mov qword [rdx], rax
cmp dword [0x18041f590], 4
jne 0x180031e7d
cmp dword [0x18041dd40], r12d
je 0x180031e7d
call fcn.180030970
mov ecx, dword [0x18041dd28]
test eax, eax
mov dword [0x18041f558], 2
cmove ecx, r13d
mov dword [0x18041dd28], ecx
call fcn.180045850
inc qword [0x18041e328]
jmp 0x180032570
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x78], rsi
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x38], r14
call fcn.180035ed0
mov rdi, qword [0x18041b3c0]
mov eax, dword [reloc.WS2_32.dll_closesocket]
mov dword [0x18041f58c], eax
mov qword [0x18041b5e0], r12
mov rbx, qword [rdi + 0x18]
test rbx, rbx
je 0x180031ed3
nop dword [rax]
mov rcx, rbx
mov rdx, r13
mov rbx, qword [rbx]
call fcn.18006453c
test rbx, rbx
jne 0x180031ec0
mov qword [rdi + 0x18], r12
mov rax, qword [0x18041b3a0]
cmp qword [0x180419df0], rax
je 0x180031eec
call fcn.18002d150
call fcn.18003ff20
lea r14, [0x18040eb58]
mov rbx, qword [r14]
test rbx, rbx
je 0x180031f15
test byte [rbx + 0x28], r13b
je 0x180031f15
mov rbx, qword [rbx + 0x30]
test rbx, rbx
je 0x180031f15
test byte [rbx + 0x28], r13b
jne 0x180031f06
mov rsi, r12
test rbx, rbx
je 0x180031f54
nop dword [rax]
mov eax, dword [rbx + 0x28]
mov rdi, qword [rbx + 0x30]
bt rax, 8
jae 0x180031f49
call fcn.18001a700
test al, al
mov edx, r12d
mov rcx, rbx
setne dl
call fcn.18002e5f0
mov qword [rsi + 0x30], rdi
jmp 0x180031f4c
mov rsi, rbx
mov rbx, rdi
test rdi, rdi
jne 0x180031f20
add r14, 0x110
lea rsi, [0x18040ed78]
cmp r14, rsi
jl 0x180031ef8
mov eax, dword [0x18041eb8c]
mov r14, qword [rsp + 0x38]
test eax, eax
jne 0x180031f7b
call fcn.18003fd40
xor r9d, r9d
lea r8, [0x18041e31c]
lea rdx, [0x18041e6fc]
mov ecx, ebp
call fcn.1800332e0
mov edx, dword [0x18041e6fc]
lea r9, [rsp + 0x68]
mov ecx, dword [0x18041e31c]
mov r8d, eax
mov dword [rsp + 0x68], edx
mov edx, ebp
mov dword [0x18041f558], eax
call fcn.1800374a0
cmp dword [0x180419054], 4
movsxd r8, eax
mov dword [0x18041f558], r8d
jb 0x180031fe9
mov r9, r8
mov edx, r13d
lea r8, str.condemned_generation_num:__d_n
mov ecx, recv
call fcn.1800124b0
mov r8d, dword [0x18041f558]
cmp qword [0x18041dd10], r12
mov ecx, dword [0x18041f58c]
je 0x180032015
inc qword [0x18041dd18]
cmp ecx, 0x11
ja 0x180032015
mov eax, 0x22e86
bt eax, ecx
jae 0x180032015
inc qword [0x18041dd20]
mov eax, dword [0x18041f55c]
cmp r8d, r13d
cmovg eax, r13d
cmp ecx, r13d
mov ecx, r8d
mov dword [0x18041f55c], eax
sete dl
call fcn.180006cb0
mov ecx, dword [0x18041f558]
cmp ecx, 2
jne 0x1800320a9
cmp dword [rsp + 0x68], r12d
jne 0x1800320a9
cmp byte [0x18041bb98], r12b
je 0x1800320a9
cmp byte [0x18041bb99], r12b
jne 0x1800320a9
mov eax, dword [0x18041f590]
dec eax
test eax, 0xfffffffd
jne 0x1800320a9
mov eax, r13d
mov dword [0x18041b61c], r13d
xchg dword [0x18041f56c], eax
movups xmm0, xmmword [0x18041b438]
mov ecx, dword [0x18041f558]
movups xmm1, xmmword [0x18041b448]
movups xmmword [0x18041b950], xmm0
movups xmm0, xmmword [0x18041b458]
movups xmmword [0x18041b960], xmm1
movups xmmword [0x18041b970], xmm0
mov edx, dword [0x18041ddf8]
inc edx
mov qword [0x18041f550], rdx
mov edx, 2
call fcn.18000c9e0
call fcn.18002fb40
lea rcx, str.BEGIN
call fcn.18002e850
call fcn.18001a6c0
test r13b, al
je 0x1800320ee
call fcn.18001a6c0
test al, 0x40
jne 0x1800320ee
mov ecx, r13d
call fcn.180045c50
call fcn.18001a6c0
cmp dword [0x18041f56c], r12d
je 0x180032539
movaps xmm0, xmmword [0x18041f550]
lea rcx, [0x18041bb70]
movaps xmmword [0x18041f020], xmm0
movaps xmm0, xmmword [0x18041f570]
movaps xmmword [0x18041f040], xmm0
movaps xmm0, xmmword [0x18041f590]
mov dword [0x18041f560], r12d
movaps xmm1, xmmword [0x18041f560]
movaps xmmword [0x18041f030], xmm1
movaps xmm1, xmmword [0x18041f580]
movaps xmmword [0x18041f060], xmm0
movsd xmm0, qword [0x18041f5b0]
movaps xmmword [0x18041f050], xmm1
movaps xmm1, xmmword [0x18041f5a0]
movsd qword [0x18041f080], xmm0
movaps xmmword [0x18041f070], xmm1
call sub.KERNEL32.dll_EnterCriticalSection
cmp dword [0x18041b618], r12d
jne 0x1800321e1
cmp qword [0x18041bb68], r12
jne 0x1800321e1
lea r9, str..NET_BGC
movzx r8d, r13b
xor edx, edx
lea rcx, [0x180029090]
call fcn.18000c390
movzx eax, al
mov dword [0x18041b618], eax
test eax, eax
je 0x1800321e1
lea rcx, [0x18041bb70]
call sub.KERNEL32.dll_LeaveCriticalSection
mov eax, dword [0x180419dd0]
cmp eax, 4
jl 0x1800321ed
mov eax, dword [0x180419dc8]
test r13b, al
je 0x1800321ed
call fcn.18000c6d0
mov rcx, rax
mov rdx, qword [rax]
call qword [rdx + 0x38]
jmp 0x1800321ed
lea rcx, [0x18041bb70]
call sub.KERNEL32.dll_LeaveCriticalSection
cmp qword [0x18041bb68], r12
mov dword [0x18041bba0], r13d
mov dword [0x18041bb9c], r12d
je 0x1800323db
lea rdi, [0x18040ea48]
nop
mov rbx, qword [rdi]
test rbx, rbx
je 0x180032310
movzx eax, byte [rbx + 0x28]
and al, 3
cmp al, r13b
jne 0x180032248
nop word [rax + rax]
mov rbx, qword [rbx + 0x30]
test rbx, rbx
je 0x180032310
movzx eax, byte [rbx + 0x28]
and al, 3
cmp al, r13b
je 0x180032230
test rbx, rbx
je 0x180032310
mov rax, qword [rbx + 0x28]
test al, 0x40
jne 0x180032303
test r13b, al
je 0x1800322d3
mov rcx, qword [rbx + 0x20]
lea rdx, [rbx + 0x10]
mov rax, qword [0x18041b570]
mov r8, qword [0x18041b578]
cmp rcx, rax
jb 0x1800322a8
mov r9, qword [rdx]
cmp r9, r8
ja 0x1800322a3
mov r8, qword [0x18041b3b0]
mov rdx, r9
call fcn.18002b9b0
test eax, eax
je 0x1800323db
or qword [rbx + 0x28], 0x40
jmp 0x180032303
cmp rax, rcx
jbe 0x1800322ab
mov rcx, rax
mov rdx, qword [rdx]
cmp r8, rdx
cmovb rdx, r8
mov r8, qword [0x18041b3b0]
call fcn.18002b9b0
test eax, eax
je 0x1800323db
or qword [rbx + 0x28], 0x80
jmp 0x180032303
mov r8, qword [0x18041b3b0]
mov rcx, rbx
mov rdx, qword [rbx + 0x10]
call fcn.18002b9b0
test eax, eax
je 0x1800323db
mov rax, qword [rbx + 0x28]
test al, al
jns 0x1800322fb
btr rax, 7
or rax, 0x40
mov qword [rbx + 0x28], rax
mov rbx, qword [rbx + 0x30]
test rbx, rbx
jne 0x180032251
add rdi, 0x110
cmp rdi, rsi
jl 0x180032210
mov rax, qword [0x18041b570]
mov ebx, 0xffffffff
cmp dword [0x18041f58c], 5
mov qword [0x18041dc80], rax
mov rax, qword [0x18041b578]
cmove ebx, r13d
mov qword [0x18041dc88], rax
mov dword [0x18041bba0], r13d
mov dword [0x18041f5b8], r13d
je 0x180032382
mov ecx, r12d
lea rdx, [0x18041dda0]
cmp qword [rdx], r12
jg 0x180032382
cmp ebx, ecx
mov eax, ecx
cmovg eax, ebx
inc ecx
add rdx, 0xb0
mov ebx, eax
cmp ecx, 2
jl 0x180032366
mov dword [0x18041b120], r13d
cmp ebx, 0xffffffff
jne 0x18003239b
xorps xmm0, xmm0
movdqa xmmword [0x18040e7f0], xmm0
jmp 0x1800323cb
lea rcx, [0x18041f550]
mov dword [0x18041bb9c], r13d
call fcn.180035e70
mov rax, qword [0x18041ddf8]
add rax, 2
mov dword [0x18041f558], ebx
mov qword [0x18041f550], rax
call fcn.18002fb40
cmp dword [0x18041bb9c], r12d
jne 0x1800323f2
call fcn.18002f0a0
jmp 0x1800323f2
mov eax, r12d
mov dword [0x18041bba0], r12d
mov dword [0x18041f560], r13d
xchg dword [0x18041f56c], eax
cmp dword [0x18041bba0], r12d
je 0x180032539
lea rcx, [0x18041b980]
mov edx, 3
lea rax, [0x18041e110]
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, r13
jne 0x180032412
cmp dword [0x18041bb9c], r12d
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 0x18003253e
mov dword [0x18041b3f8], r12d
mov dword [0x18041b3fc], 0x8000
mov dword [0x18041e2d8], r12d
mov dword [0x18041e2dc], 0x8000
call fcn.1800325a0
movaps xmm0, xmmword [0x18041f020]
movaps xmm1, xmmword [0x18041f030]
movaps xmmword [0x18041f550], xmm0
movaps xmm0, xmmword [0x18041f040]
movaps xmmword [0x18041f570], xmm0
movaps xmm0, xmmword [0x18041f060]
movaps xmmword [0x18041f560], xmm1
movaps xmm1, xmmword [0x18041f050]
movaps xmmword [0x18041f590], xmm0
movsd xmm0, qword [0x18041f080]
movaps xmmword [0x18041f580], xmm1
movaps xmm1, xmmword [0x18041f070]
movsd qword [0x18041f5b0], xmm0
movaps xmmword [0x18041f5a0], xmm1
call fcn.18002f0a0
jmp 0x18003253e
call fcn.1800325a0
call sub.KERNEL32.dll_GetTickCount
mov rdi, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x78]
mov rbx, qword [rsp + 0x60]
mov eax, eax
mov qword [0x18041b428], rax
mov rax, qword [0x18041dda0]
mov qword [0x18041b430], rax
mov qword [0x18041b3d8], rax
mov r13, qword [rsp + 0x40]
cmp r15d, 4
mov r15, qword [rsp + 0x30]
mov r12, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x70]
jne 0x180032593
add rsp, 0x58
jmp 0x180022720
add rsp, 0x58
ret