Function at 0x516390
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55894b
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x5c2b80]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x18], edi
mov eax, dword [ebp + 8]
mov ecx, 0x5a7600
mov dword [ebp - 0x50], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x1c], 0
call fcn.004f06e0
push eax
lea ecx, [ebp - 0x44]
call fcn.00457210
mov dword [ebp - 4], 0
lea edx, [edi + 0x60]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00457990
add esp, 4
mov byte [ebp - 4], 2
or ebx, 0xffffffff
mov edx, dword [ebp - 0x44]
mov eax, ebx
add edx, 0xfffffff0
lea ecx, [edx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x516425
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x1c]
cmp dword [eax - 0xc], 0
jne 0x51653c
push 1
push ecx
mov ecx, esp
mov dword [ebp - 0x48], esp
push str.4uI
call fcn.00457210
mov byte [ebp - 4], 4
lea eax, [ebp - 0x3c]
push eax
mov byte [ebp - 4], 2
mov ecx, edi
call fcn.004fc4b0
mov byte [ebp - 4], 5
mov edx, dword [eax]
mov esi, dword [ebp - 0x1c]
add esi, 0xfffffff0
lea ecx, [edx - 0x10]
cmp ecx, esi
je 0x5164ae
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x51649f
mov eax, dword [ecx]
cmp eax, dword [esi]
jne 0x51649f
call fcn.00456280
mov dword [ebp - 0x40], eax
mov ecx, ebx
lock xadd dword [edi], ecx
dec ecx
test ecx, ecx
jg 0x516497
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x40]
add eax, 0x10
mov dword [ebp - 0x1c], eax
jmp 0x5164ab
push dword [edx - 0xc]
lea ecx, [ebp - 0x1c]
push edx
call fcn.004573c0
mov edi, dword [ebp - 0x18]
mov byte [ebp - 4], 2
mov ecx, ebx
mov edx, dword [ebp - 0x3c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x5164ce
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x1c]
cmp dword [eax - 0xc], 0
jge 0x5164e1
push 0x80070057
call fcn.00456ea0
cmp word [eax], 0x5f
jne 0x51653c
cmp dword [eax - 0xc], 0
lea edx, [eax - 0x10]
mov esi, dword [edx]
je 0x51653c
cmp dword [edx + 0xc], 0
lea ecx, [edx + 0xc]
jge 0x51651c
cmp dword [eax - 8], 0
jge 0x51650b
push 0x80070057
call fcn.00456ea0
mov dword [eax - 0xc], 0
xor ecx, ecx
mov eax, dword [ebp - 0x1c]
mov word [eax], cx
jmp 0x51653c
mov eax, ebx
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x51652f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x1c], eax
mov ecx, 0x5a76b0
mov dword [ebp - 0x24], 0
call fcn.004f06e0
push eax
lea ecx, [ebp - 0x3c]
call fcn.00457210
mov byte [ebp - 4], 7
lea edx, [edi + 0x60]
push eax
lea ecx, [ebp - 0x24]
call fcn.00457990
add esp, 4
mov byte [ebp - 4], 9
mov ecx, ebx
mov edx, dword [ebp - 0x3c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x516589
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x24]
cmp dword [eax - 0xc], 0
jne 0x516632
push 1
push ecx
mov ecx, esp
mov dword [ebp - 0x48], esp
push str.4OIB
call fcn.00457210
mov byte [ebp - 4], 0xb
lea eax, [ebp - 0x40]
push eax
mov byte [ebp - 4], 9
mov ecx, edi
call fcn.004fc4b0
mov byte [ebp - 4], 0xc
mov edx, dword [eax]
mov esi, dword [ebp - 0x24]
add esi, 0xfffffff0
lea ecx, [edx - 0x10]
cmp ecx, esi
je 0x516612
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x516603
mov eax, dword [ecx]
cmp eax, dword [esi]
jne 0x516603
call fcn.00456280
mov dword [ebp - 0x3c], eax
mov ecx, ebx
lock xadd dword [edi], ecx
dec ecx
test ecx, ecx
jg 0x5165fb
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x3c]
add eax, 0x10
mov dword [ebp - 0x24], eax
jmp 0x51660f
push dword [edx - 0xc]
lea ecx, [ebp - 0x24]
push edx
call fcn.004573c0
mov edi, dword [ebp - 0x18]
mov byte [ebp - 4], 9
mov ecx, ebx
mov edx, dword [ebp - 0x40]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x516632
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, 0x5a7750
mov dword [ebp - 0x20], 0
call fcn.004f06e0
push eax
lea ecx, [ebp - 0x3c]
call fcn.00457210
mov byte [ebp - 4], 0xe
lea edx, [edi + 0x60]
push eax
lea ecx, [ebp - 0x20]
call fcn.00457990
add esp, 4
mov byte [ebp - 4], 0x10
mov ecx, ebx
mov edx, dword [ebp - 0x3c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x51667f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x20]
cmp dword [eax - 0xc], 0
jne 0x516793
push 1
push ecx
mov ecx, esp
mov dword [ebp - 0x48], esp
push str.4g
call fcn.00457210
mov byte [ebp - 4], 0x12
lea eax, [ebp - 0x44]
push eax
mov byte [ebp - 4], 0x10
mov ecx, edi
call fcn.004fc4b0
mov byte [ebp - 4], 0x13
mov edx, dword [eax]
mov esi, dword [ebp - 0x20]
add esi, 0xfffffff0
lea ecx, [edx - 0x10]
cmp ecx, esi
je 0x516705
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x5166f9
mov eax, dword [ecx]
cmp eax, dword [esi]
jne 0x5166f9
call fcn.00456280
mov dword [ebp - 0x40], eax
mov ecx, ebx
lock xadd dword [edi], ecx
dec ecx
test ecx, ecx
jg 0x5166f1
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x40]
add eax, 0x10
mov dword [ebp - 0x20], eax
jmp 0x516705
push dword [edx - 0xc]
lea ecx, [ebp - 0x20]
push edx
call fcn.004573c0
mov byte [ebp - 4], 0x10
mov ecx, ebx
mov edx, dword [ebp - 0x44]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x516725
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x20]
cmp dword [eax - 0xc], 0
jge 0x516738
push 0x80070057
call fcn.00456ea0
cmp word [eax], 0x5f
jne 0x516793
cmp dword [eax - 0xc], 0
lea edx, [eax - 0x10]
mov esi, dword [edx]
je 0x516793
cmp dword [edx + 0xc], 0
lea ecx, [edx + 0xc]
jge 0x516773
cmp dword [eax - 8], 0
jge 0x516762
push 0x80070057
call fcn.00456ea0
mov dword [eax - 0xc], 0
xor ecx, ecx
mov eax, dword [ebp - 0x20]
mov word [eax], cx
jmp 0x516793
mov eax, ebx
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x516786
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x20], eax
mov ecx, 0x5a7800
mov dword [ebp - 0x28], 0
call fcn.004f06e0
push eax
lea ecx, [ebp - 0x28]
call fcn.00457210
mov byte [ebp - 4], 0x15
mov eax, dword [ebp - 0x1c]
cmp dword [eax - 0xc], 0
je 0x51686e
call fcn.00456bd0
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x5167da
push 0x80004005
call fcn.00456ea0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 0x17
mov ecx, 0x5a7860
call fcn.004f06e0
push eax
lea ecx, [ebp - 0x3c]
call fcn.00457210
mov byte [ebp - 4], 0x18
push dword [ebp - 0x1c]
mov esi, dword [eax]
call fcn.0052dbd9
add esp, 4
mov ecx, eax
call fcn.0045b530
push edx
push eax
lea eax, [ebp - 0x18]
push esi
push eax
call fcn.00457480
add esp, 0x10
mov byte [ebp - 4], 0x17
mov ecx, ebx
mov edx, dword [ebp - 0x3c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x516845
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x18]
lea ecx, [ebp - 0x28]
push dword [esi - 0xc]
push esi
call fcn.0045c160
mov byte [ebp - 4], 0x15
add esi, 0xfffffff0
mov ecx, ebx
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x5168b4
mov ecx, dword [esi]
push esi
jmp 0x5168af
mov ecx, 0x5a78a0
call fcn.004f06e0
push eax
lea ecx, [ebp - 0x3c]
call fcn.00457210
mov byte [ebp - 4], 0x1b
lea ecx, [ebp - 0x28]
push 0x5911c0
push dword [eax]
call fcn.0045b800
mov byte [ebp - 4], 0x15
mov ecx, ebx
mov edx, dword [ebp - 0x3c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x5168b4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, 0x5a78c0
call fcn.004f06e0
push eax
lea ecx, [ebp - 0x3c]
call fcn.00457210
mov byte [ebp - 4], 0x1d
lea ecx, [ebp - 0x28]
mov eax, dword [eax]
push dword [eax - 0xc]
push eax
call fcn.0045c160
mov byte [ebp - 4], 0x15
mov ecx, ebx
mov edx, dword [ebp - 0x3c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x5168f9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xorps xmm0, xmm0
mov dword [ebp - 0x2c], 0
movq qword [ebp - 0x34], xmm0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov byte [ebp - 4], 0x1f
lea ecx, [ebp - 0x34]
call fcn.0045e8f0
test al, al
jne 0x5169d1
mov ecx, 0x5a7900
call fcn.004f06e0
push eax
lea ecx, [ebp - 0x44]
call fcn.00457210
mov esi, eax
mov byte [ebp - 4], 0x20
lea ecx, [ebp - 0x40]
call fcn.0045ef80
mov byte [ebp - 4], 0x21
mov edx, eax
push esi
lea ecx, [ebp - 0x3c]
call fcn.0045bbe0
add esp, 4
mov byte [ebp - 4], 0x22
lea ecx, [ebp - 0x34]
push eax
call fcn.0045bd60
mov byte [ebp - 4], 0x21
mov ecx, ebx
mov edx, dword [ebp - 0x3c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x516991
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x20
mov ecx, ebx
mov edx, dword [ebp - 0x40]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x5169b1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x1f
mov ecx, ebx
mov edx, dword [ebp - 0x44]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x5169d1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x30]
sub esi, dword [ebp - 0x34]
mov edi, dword [ebp - 0x50]
mov ecx, edi
sar esi, 2
push esi
mov dword [ebp - 0x48], esi
call fcn.0051b490
mov ecx, dword [ebp - 0x54]
push esi
call fcn.0051b490
xor ecx, ecx
test esi, esi
je 0x516a1a
mov ebx, dword [ebp - 0x54]
lea ebx, [ebx]
mov eax, dword [ebx]
mov dword [eax + ecx*4], 0
mov eax, dword [edi]
mov dword [eax + ecx*4], 0
inc ecx
cmp ecx, esi
jb 0x516a00
or ebx, 0xffffffff
xor edi, edi
mov dword [ebp - 0x44], edi
test esi, esi
je 0x516c4b
jmp 0x516a30
push 0x28
mov dword [ebp - 0x38], 0
call fcn.0052abbc
add esp, 4
mov dword [ebp - 0x4c], eax
mov byte [ebp - 4], 0x26
test eax, eax
je 0x516a5a
mov ecx, eax
call fcn.004f9900
mov esi, eax
mov dword [ebp - 0x18], eax
jmp 0x516a5f
xor esi, esi
mov dword [ebp - 0x18], esi
mov byte [ebp - 4], 0x1f
lea eax, [edi*4]
mov ecx, dword [ebp - 0x34]
lea edx, [esi + 0x10]
mov edi, dword [edx]
mov dword [ebp - 0x4c], eax
sub edi, 0x10
mov dword [ebp - 0x40], edx
mov eax, dword [ecx + eax]
lea esi, [eax - 0x10]
cmp esi, edi
je 0x516b29
cmp dword [edi + 0xc], 0
jl 0x516b1e
mov ecx, dword [esi]
cmp ecx, dword [edi]
jne 0x516b1e
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [esi + 0xc], 0
lea edx, [esi + 0xc]
mov ecx, eax
jl 0x516abc
cmp ecx, dword [esi]
jne 0x516abc
mov eax, 1
lock xadd dword [edx], eax
jmp 0x516afe
mov eax, dword [ecx]
push 2
push dword [esi + 4]
call dword [eax]
mov edx, eax
mov dword [ebp - 0x3c], edx
test edx, edx
je 0x516cca
mov ecx, dword [esi + 4]
mov dword [edx + 4], ecx
mov ecx, dword [esi + 4]
lea eax, [ecx*2 + 2]
push eax
lea eax, [esi + 0x10]
push eax
lea eax, [ecx*2 + 2]
push eax
lea eax, [edx + 0x10]
push eax
call fcn.0052b264
mov esi, dword [ebp - 0x3c]
add esp, 0x10
mov eax, ebx
lea ecx, [edi + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x516b14
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0x40]
lea eax, [esi + 0x10]
mov dword [ecx], eax
jmp 0x516b29
push dword [eax - 0xc]
mov ecx, edx
push eax
call fcn.004573c0
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x28]
add edx, 0x14
mov dword [ebp - 0x40], edx
mov edi, dword [edx]
lea esi, [eax - 0x10]
sub edi, 0x10
cmp esi, edi
je 0x516be5
cmp dword [edi + 0xc], 0
jl 0x516bda
mov ecx, dword [esi]
cmp ecx, dword [edi]
jne 0x516bda
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [esi + 0xc], 0
lea edx, [esi + 0xc]
mov ecx, eax
jl 0x516b78
cmp ecx, dword [esi]
jne 0x516b78
mov eax, 1
lock xadd dword [edx], eax
jmp 0x516bba
mov eax, dword [ecx]
push 2
push dword [esi + 4]
call dword [eax]
mov edx, eax
mov dword [ebp - 0x3c], edx
test edx, edx
je 0x516cca
mov ecx, dword [esi + 4]
mov dword [edx + 4], ecx
mov ecx, dword [esi + 4]
lea eax, [ecx*2 + 2]
push eax
lea eax, [esi + 0x10]
push eax
lea eax, [ecx*2 + 2]
push eax
lea eax, [edx + 0x10]
push eax
call fcn.0052b264
mov esi, dword [ebp - 0x3c]
add esp, 0x10
mov eax, ebx
lea ecx, [edi + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x516bd0
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0x40]
lea eax, [esi + 0x10]
mov dword [ecx], eax
jmp 0x516be5
push dword [eax - 0xc]
mov ecx, edx
push eax
call fcn.004573c0
push dword [ebp - 0x20]
call fcn.0052dbd9
mov esi, dword [ebp - 0x18]
add esp, 4
mov dword [esi + 0x1c], eax
mov eax, dword [ebp - 0x24]
cmp dword [eax - 0xc], 0
je 0x516c0b
push eax
call fcn.0052dbd9
add esp, 4
mov dword [esi + 0x18], eax
lea eax, [ebp - 0x38]
push eax
push 0
push esi
push 0x4fa210
push 0
push 0
call fcn.0052d319
add esp, 0x18
cmp eax, 0xffffffff
je 0x516c3b
mov ecx, dword [ebp - 0x50]
mov edx, dword [ebp - 0x4c]
mov ecx, dword [ecx]
mov dword [edx + ecx], eax
mov eax, dword [ebp - 0x54]
mov eax, dword [eax]
mov dword [edx + eax], esi
mov edi, dword [ebp - 0x44]
inc edi
mov dword [ebp - 0x44], edi
cmp edi, dword [ebp - 0x48]
jb 0x516a30
mov ecx, dword [ebp - 0x50]
mov eax, dword [ecx]
cmp eax, dword [ecx + 4]
jne 0x516d46
mov ecx, 0x5a7940
call fcn.004f06e0
push eax
lea ecx, [ebp - 0x4c]
call fcn.00457210
mov byte [ebp - 4], 0x27
mov edx, dword [ebp - 0x58]
mov eax, dword [eax]
mov edi, dword [edx]
lea esi, [eax - 0x10]
sub edi, 0x10
cmp esi, edi
je 0x516d26
cmp dword [edi + 0xc], 0
jl 0x516d1b
mov ecx, dword [esi]
cmp ecx, dword [edi]
jne 0x516d1b
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [esi + 0xc], 0
mov ecx, eax
lea eax, [esi + 0xc]
jl 0x516cb8
cmp ecx, dword [esi]
jne 0x516cb8
mov ecx, 1
lock xadd dword [eax], ecx
jmp 0x516cfb
mov eax, dword [ecx]
push 2
push dword [esi + 4]
call dword [eax]
mov edx, eax
mov dword [ebp - 0x48], edx
test edx, edx
jne 0x516ccf
call fcn.00456de0
mov eax, dword [esi + 4]
mov dword [edx + 4], eax
mov ecx, dword [esi + 4]
lea eax, [ecx*2 + 2]
push eax
lea eax, [esi + 0x10]
push eax
lea eax, [ecx*2 + 2]
push eax
lea eax, [edx + 0x10]
push eax
call fcn.0052b264
mov esi, dword [ebp - 0x48]
add esp, 0x10
mov eax, ebx
lea ecx, [edi + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x516d11
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0x58]
lea eax, [esi + 0x10]
mov dword [ecx], eax
jmp 0x516d26
push dword [eax - 0xc]
mov ecx, edx
push eax
call fcn.004573c0
mov byte [ebp - 4], 0x1f
mov ecx, ebx
mov edx, dword [ebp - 0x4c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x516d46
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x15
mov edi, dword [ebp - 0x34]
test edi, edi
je 0x516da8
mov esi, edi
mov dword [ebp - 0x48], esi
cmp edi, dword [ebp - 0x30]
je 0x516d8a
jmp 0x516d60
mov byte [ebp - 4], 0x15
mov ecx, ebx
mov edx, dword [esi]
sub edx, 0x10
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x516d7f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 4
mov dword [ebp - 0x48], esi
cmp esi, dword [ebp - 0x30]
jne 0x516d60
push edi
call fcn.0047c370
add esp, 4
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov byte [ebp - 4], 0x10
mov ecx, ebx
mov edx, dword [ebp - 0x28]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x516dc8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 9
mov ecx, ebx
mov edx, dword [ebp - 0x20]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x516de8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
mov ecx, ebx
mov edx, dword [ebp - 0x24]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x516e08
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x1c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x516e29
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0052ab62
mov esp, ebp
pop ebp
ret 0xc