Function at 0x51ebf0
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x38
push esi
mov esi, ecx
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x51ef22
mov eax, dword [ecx + 0x98]
add eax, dword [ecx + 0x94]
je 0x51ec31
mov eax, dword [esp + 0x40]
mov dword [esp + 0x10], eax
lea eax, [esp + 8]
push eax
mov byte [esp + 0xc], 0x12
mov dword [esp + 0x10], esi
call fcn.00510450
pop esi
add esp, 0x38
ret 4
inc dword [ecx + 0x94]
mov eax, dword [esi + 8]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
push edi
mov edi, dword [eax + 0x34c]
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], connect
mov dword [esp + 0x44], edi
test edi, edi
je 0x51ec9a
push dword [0x884adc]
call ebp
mov ecx, eax
lea edx, [edi*8 + 0x7f]
and edx, 0xffffff80
mov eax, dword [ecx + 0xc]
lea ebx, [eax + edx]
cmp edx, dword [ecx + 8]
jg 0x51ec92
cmp ebx, dword [ecx + 0x10]
ja 0x51ec92
mov dword [ecx + 0xc], ebx
jmp 0x51ec9c
push edx
call fcn.0046a3c0
jmp 0x51ec9c
xor eax, eax
mov dword [esp + 0x34], eax
or edi, 0x80000000
mov dword [esp + 0x40], eax
mov eax, dword [esi + 8]
mov dword [esp + 0x3c], edi
mov edi, dword [eax + 0x34c]
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], connect
mov dword [esp + 0x30], edi
test edi, edi
je 0x51ed08
push dword [0x884adc]
call ebp
mov ecx, eax
lea edx, [edi*8 + 0x7f]
and edx, 0xffffff80
mov eax, dword [ecx + 0xc]
lea ebx, [eax + edx]
cmp edx, dword [ecx + 8]
jg 0x51ed00
cmp ebx, dword [ecx + 0x10]
ja 0x51ed00
mov dword [ecx + 0xc], ebx
jmp 0x51ed0a
push edx
call fcn.0046a3c0
jmp 0x51ed0a
xor eax, eax
mov dword [esp + 0x20], eax
or edi, 0x80000000
mov dword [esp + 0x2c], eax
lea eax, [esi + 0x24]
mov dword [esp + 0x10], eax
mov eax, dword [esi + 8]
mov dword [esp + 0x28], edi
mov ecx, dword [eax + 0x58]
cmp dword [ecx + 0x1c], 0
je 0x51ed34
call fcn.006af4d0
mov eax, dword [esi + 8]
lea edx, [esp + 0x20]
mov edi, dword [esp + 0x4c]
push edx
lea edx, [esp + 0x38]
mov ecx, dword [eax + 0x58]
push edx
push 1
push edi
mov eax, dword [ecx]
lea edx, [esp + 0x20]
push edx
call dword [eax + 0x2c]
cmp dword [esp + 0x38], 0
jne 0x51ed63
cmp dword [esp + 0x24], 0
je 0x51edb1
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x38]
push eax
call fcn.006aef90
mov ecx, dword [esi + 8]
add esp, 8
push dword [esp + 0x24]
mov ecx, dword [ecx + 0x64]
push dword [esp + 0x24]
call fcn.006af340
mov ecx, dword [esi + 8]
mov eax, dword [ecx + 0x7c]
test eax, eax
je 0x51ed97
add eax, 8
jmp 0x51ed99
xor eax, eax
mov ecx, dword [ecx + 0x64]
push eax
push dword [esp + 0x3c]
push dword [esp + 0x3c]
call fcn.006af2d0
mov ecx, esi
call fcn.0051f060
mov eax, dword [esi + 8]
mov ecx, dword [eax + 0x58]
cmp dword [ecx + 0x1c], 0
je 0x51edc2
call fcn.006af4e0
push edi
mov ecx, esi
call fcn.0051ef30
mov eax, dword [esi + 8]
mov ecx, dword [eax + 0x5c]
test ecx, ecx
je 0x51eddb
mov eax, dword [ecx]
push 0
call dword [eax + 0x14]
mov esi, dword [esi + 8]
add dword [esi + 0x94], 0xffffffff
jne 0x51ee19
cmp byte [esi + 0x9c], 0
jne 0x51ee19
cmp dword [esi + 0x8c], 0
je 0x51ee00
mov ecx, esi
call fcn.00510540
cmp dword [esi + 0xa4], 1
jne 0x51ee19
cmp dword [esi + 0x90], 0
je 0x51ee19
mov ecx, esi
call fcn.00510560
mov edi, dword [esp + 0x2c]
xor ecx, ecx
mov eax, dword [esp + 0x24]
cmp edi, dword [esp + 0x20]
push dword [0x884adc]
cmove eax, ecx
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x34]
lea esi, [eax*8 + 0x7f]
and esi, 0xffffff80
call ebp
lea edx, [esi + 0xf]
and edx, 0xfffffff0
cmp esi, dword [eax + 8]
jg 0x51ee61
lea ecx, [edx + edi]
cmp ecx, dword [eax + 0xc]
jne 0x51ee61
cmp dword [eax + 0x14], edi
je 0x51ee61
mov dword [eax + 0xc], edi
jmp 0x51ee6a
push edx
push edi
mov ecx, eax
call fcn.0046a590
mov eax, dword [esp + 0x28]
mov dword [esp + 0x24], 0
test eax, eax
js 0x51ee94
and eax, 0x3fffffff
mov ecx, 0x7d8954
shl eax, 3
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x24]
call dword [eax + 0x10]
mov edi, dword [esp + 0x40]
xor ecx, ecx
mov eax, dword [esp + 0x38]
cmp edi, dword [esp + 0x34]
push dword [0x884adc]
cmove eax, ecx
mov dword [esp + 0x24], 0
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x2c], connect
lea esi, [eax*8 + 0x7f]
and esi, 0xffffff80
call ebp
lea edx, [esi + 0xf]
and edx, 0xfffffff0
cmp esi, dword [eax + 8]
jg 0x51eeec
lea ecx, [edx + edi]
cmp ecx, dword [eax + 0xc]
jne 0x51eeec
cmp dword [eax + 0x14], edi
je 0x51eeec
mov dword [eax + 0xc], edi
jmp 0x51eef5
push edx
push edi
mov ecx, eax
call fcn.0046a590
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x38], 0
pop edi
pop ebp
pop ebx
test eax, eax
js 0x51ef22
and eax, 0x3fffffff
mov ecx, 0x7d8954
shl eax, 3
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x2c]
call dword [eax + 0x10]
pop esi
add esp, 0x38
ret 4