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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
and dword [ebp - 8], 0
mov eax, ecx
push ebx
push esi
push edi
mov ecx, dword [eax + 0x3f8]
mov ebx, dword [eax]
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], ecx
call fcn.00519343
mov edi, edx
mov esi, eax
mov edx, dword [ebp - 4]
mov dword [ebx + 0x50], esi
mov dword [ebx + 0x54], edi
mov dword [ebx + 0x58], esi
mov dword [ebx + 0x5c], edi
cmp dword [edx], 3
je 0x521494
mov eax, dword [ebp - 8]
test eax, eax
jne 0x521494
imul eax, dword [edx + 0x1c], 0x3e8
cmp dword [ebx + 0x2dc], 0
mov dword [ebp - 0x14], eax
mov ecx, eax
je 0x5212e4
mov eax, dword [ebx + 0x1c0]
or eax, dword [ebx + 0x1c4]
je 0x52133d
mov eax, dword [ebx + 0x1c4]
cmp dword [ebx + 0x48c], eax
jl 0x52133d
jg 0x5212ce
mov edx, dword [ebx + 0x488]
cmp edx, dword [ebx + 0x1c0]
mov edx, dword [ebp - 4]
jbe 0x52133d
push dword [ebx + 0x48c]
mov ecx, dword [ebx + 0x488]
push ecx
push eax
push dword [ebx + 0x1c0]
jmp 0x521327
mov eax, dword [ebx + 0x1c8]
or eax, dword [ebx + 0x1cc]
je 0x52133d
mov eax, dword [ebx + 0x1cc]
cmp dword [ebx + 0x484], eax
jl 0x52133d
jg 0x521313
mov edx, dword [ebx + 0x480]
cmp edx, dword [ebx + 0x1c8]
mov edx, dword [ebp - 4]
jbe 0x52133d
push dword [ebx + 0x484]
mov ecx, dword [ebx + 0x480]
push ecx
push eax
push dword [ebx + 0x1c8]
mov ecx, dword [edx + 0x154]
or dword [ebp - 0x10], 0xffffffff
call fcn.005125f2
mov ecx, eax
add esp, 0x10
jmp 0x521343
mov eax, dword [edx + 0x14]
mov dword [ebp - 0x10], eax
cmp dword [ebx + 0x19c], 0
je 0x52137a
push dword [ebx + 0x54]
push dword [ebx + 0x50]
push dword [ebx + 0x5c]
push dword [ebx + 0x58]
call fcn.00519359
mov ecx, dword [ebx + 0x19c]
add esp, 0x10
sub ecx, eax
mov eax, dword [ebp - 0x14]
cmp ecx, eax
jle 0x521373
mov ecx, eax
jmp 0x52137a
xor eax, eax
test ecx, ecx
cmovs ecx, eax
push ecx
mov ecx, dword [ebp - 0x10]
or edx, 0xffffffff
push 0xffffffffffffffff
call fcn.0051836a
mov dword [ebp - 0x14], eax
call fcn.00519343
push dword [ebx + 0x54]
mov dword [ebx + 0x58], eax
push dword [ebx + 0x50]
mov dword [ebx + 0x5c], edx
push edx
push eax
call fcn.00519359
add esp, 0x18
cmp eax, dword [ebx + 0x19c]
jl 0x5213ca
mov ecx, dword [ebp - 0xc]
call fcn.00518c4e
test eax, eax
jne 0x5214b7
mov eax, dword [ebx + 0x58]
mov dword [ebx + 0x50], eax
mov eax, dword [ebx + 0x5c]
mov dword [ebx + 0x54], eax
mov eax, dword [ebp - 0x14]
cmp eax, 0xffffffff
jne 0x5213fd
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp - 0xc]
mov edx, eax
call fcn.0052922c
push eax
push 0x5949b0
push ebx
call fcn.00510cc2
mov ecx, dword [ebp - 4]
add esp, 0xc
mov dword [ecx + 0xc], 5
jmp 0x521471
test eax, eax
jne 0x521432
push edi
push esi
push dword [ebx + 0x5c]
push dword [ebx + 0x58]
call fcn.00519359
mov edx, dword [ebp - 4]
add esp, 0x10
imul ecx, dword [edx + 0x1c], 0x3e8
cmp eax, ecx
jle 0x521488
mov ecx, dword [ebp - 0xc]
mov dword [edx + 0xc], 7
xor edx, edx
call fcn.005211ad
jmp 0x52146e
mov ecx, dword [ebp - 0xc]
call fcn.00520fd1
mov dword [ebp - 8], eax
test eax, eax
jne 0x52144a
call fcn.00519343
mov esi, eax
mov edi, edx
mov ecx, dword [ebx + 0x20]
test ecx, ecx
je 0x52145c
mov eax, dword [ebx + 0x38]
mov dword [ecx], eax
mov eax, dword [ebx + 0x3c]
mov dword [ecx + 4], eax
mov ecx, dword [ebx + 0x30]
test ecx, ecx
je 0x52146e
mov eax, dword [ebx + 0x40]
mov dword [ecx], eax
mov eax, dword [ebx + 0x44]
mov dword [ecx + 4], eax
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 8]
test eax, eax
jne 0x5214b0
mov edx, dword [ecx + 0xc]
call fcn.00520d99
mov edx, dword [ebp - 4]
mov dword [ebp - 8], eax
jmp 0x52148b
mov eax, dword [ebp - 8]
cmp dword [edx], 3
jne 0x52127a
mov ecx, dword [ebp - 0xc]
xor eax, eax
push eax
push 0xffffffffffffffff
push eax
push eax
push 0xffffffffffffffff
push 0xffffffffffffffff
or edx, 0xffffffff
call fcn.00512dae
mov eax, dword [ebp - 8]
add esp, 0x18
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
push 5
pop edx
call fcn.00520d99
push 0x2a
pop eax
jmp 0x5214b0