Function at 0x52be20
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0xcc
push ebx
push ebp
mov ebp, dword [esp + 0xdc]
push esi
movzx esi, byte [ecx + 0xe8]
push edi
cmp esi, ebp
je 0x52c380
cmp esi, 5
jne 0x52be64
add ecx, 0x10
call fcn.006ad050
mov ecx, dword [esp + 0xe0]
call fcn.00507bd0
mov ecx, dword [esp + 0xe0]
cmp ebp, 5
je 0x52be72
cmp ebp, 4
je 0x52be72
mov bh, 1
jmp 0x52be74
xor bh, bh
cmp esi, 5
je 0x52be82
cmp esi, 4
je 0x52be82
mov bl, 1
jmp 0x52be84
xor bl, bl
test bh, bh
je 0x52be99
test bl, bl
jne 0x52be99
cmp dword [ecx + 0x1f8], 0
je 0x52c380
call fcn.0045c0c0
mov eax, dword [esp + 0xe0]
xor ecx, ecx
cmp esi, 5
sete cl
mov edi, dword [eax + 8]
xor eax, eax
cmp ebp, 5
sete al
cmp ecx, eax
setne al
test edi, edi
je 0x52c334
test al, al
je 0x52c334
lea eax, [esp + 0x9c]
mov word [edi + 0x9c], 1
mov dword [esp + 0x90], eax
mov ecx, 0x200
lea eax, [esp + 0x50]
mov dword [esp + 0x94], 0
mov dword [esp + 0x44], eax
lea eax, [esp + 0x40]
mov dword [esp + 0x34], eax
lea eax, [esp + 0x2c]
mov dword [esp + 0x20], eax
lea eax, [esp + 0x90]
push eax
push dword [esp + 0xe4]
mov dword [esp + 0xa0], reloc.WSOCK32.dll_recv
mov dword [esp + 0x50], 0
mov dword [esp + 0x54], reloc.WSOCK32.dll_recv
mov dword [esp + 0x40], 0
mov dword [esp + 0x44], reloc.WSOCK32.dll_accept
mov word [esp + 0x38], cx
mov byte [esp + 0x3a], 2
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], reloc.WSOCK32.dll_accept
mov word [esp + 0x24], cx
mov byte [esp + 0x26], 1
call fcn.0052c900
add esp, 8
lea eax, [esp + 0x44]
push eax
push dword [esp + 0xe4]
push edi
cmp ebp, 5
je 0x52bf8b
call fcn.0052bac0
jmp 0x52bf90
call fcn.0052bbb0
mov eax, dword [esp + 0xec]
lea edx, [esp + 0x3c]
add esp, 0xc
mov ecx, dword [eax + 0xcc]
push ebp
push edx
push eax
lea eax, [ecx + 0x70]
push eax
call fcn.0052c840
mov eax, dword [esp + 0xf0]
lea edx, [esp + 0x2c]
push ebp
push edx
push eax
mov ecx, dword [eax + 0xcc]
lea eax, [ecx + 0x5c]
push eax
call fcn.0052c840
add esp, 0x20
cmp esi, 5
je 0x52bff2
mov eax, dword [esp + 0xe0]
mov ecx, dword [eax + 0xcc]
cmp dword [ecx + 0x50], 2
jle 0x52bff2
mov al, byte [ecx + 0x25]
and al, 0xfd
or al, 1
mov byte [ecx + 0x25], al
push dword [esp + 0xe0]
push edi
call fcn.00529c90
add esp, 8
push edi
push ecx
mov eax, esp
push ecx
mov byte [eax], bl
mov eax, esp
push ebp
mov byte [eax], bh
push dword [esp + 0xf0]
call fcn.0052c390
push dword [esp + 0xfc]
push dword [esp + 0xf8]
push edi
call fcn.00529b90
lea eax, [esp + 0x64]
push eax
push dword [esp + 0x104]
push edi
call fcn.0052bd10
xor ebx, ebx
mov byte [edi + 0x9d], 1
add esp, 0x2c
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], connect
cmp dword [esp + 0x94], ebx
jle 0x52c097
nop dword [eax]
mov eax, dword [esp + 0x90]
push 0
mov esi, dword [eax + ebx*4]
push esi
push edi
call fcn.00529d40
add esp, 0xc
mov ecx, esi
call fcn.0045c160
inc ebx
cmp ebx, dword [esp + 0x94]
jl 0x52c070
cmp ebp, 5
je 0x52c10e
mov ecx, dword [esp + 0xe0]
lea eax, [esp + 0x10]
push eax
add ecx, 0x10
call fcn.006acf50
mov ebx, dword [esp + 0x14]
xor esi, esi
test ebx, ebx
jle 0x52c10e
mov edx, dword [esp + 0xe0]
mov eax, dword [esp + 0x10]
mov eax, dword [eax + esi*8 + 4]
movsx ecx, byte [eax + 0x10]
add ecx, eax
cmp byte [edx + 0xe8], 5
je 0x52c107
cmp byte [ecx + 0xe8], 5
je 0x52c107
mov eax, dword [edx + 0xcc]
cmp eax, dword [ecx + 0xcc]
je 0x52c107
push ecx
push edx
push dword [edx + 8]
call fcn.0052a1c0
mov edx, dword [esp + 0xec]
add esp, 0xc
mov ebx, dword [esp + 0x14]
inc esi
cmp esi, ebx
jl 0x52c0c1
jmp 0x52c115
mov edx, dword [esp + 0xe0]
lea eax, [esp + 0x30]
push eax
mov eax, dword [edx + 0xcc]
add eax, 0x70
push eax
call fcn.006ad5e0
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0xec]
mov eax, dword [eax + 0xcc]
add eax, 0x5c
push eax
call fcn.006ad5e0
add esp, 0x10
cmp ebp, 5
jne 0x52c1b3
mov eax, dword [esp + 0xe0]
movss xmm0, dword [edi + 0x1e0]
add eax, 0xf0
push eax
push ecx
movss dword [esp], xmm0
call fcn.00650b80
mov ecx, dword [edi + 8]
lea edx, [esp + 0xe8]
inc dword [edi + 0x94]
add esp, 8
mov eax, dword [ecx]
push 7
push edi
push 1
push edx
call dword [eax + 0x30]
push edi
lea eax, [esp + 0xe4]
push 1
push eax
call fcn.004fba30
mov eax, dword [esp + 0xec]
push eax
push dword [eax + 8]
call fcn.00528e80
add esp, 0x14
dec dword [edi + 0x94]
push 1
push dword [esp + 0xf0]
mov ecx, edi
push dword [esp + 0xe8]
call fcn.0050c200
cmp dword [edi + 0x94], 0
mov byte [edi + 0x9c], 0
jne 0x52c203
cmp dword [edi + 0x8c], 0
je 0x52c1ea
mov ecx, edi
call fcn.00510540
cmp dword [edi + 0xa4], 1
jne 0x52c203
cmp dword [edi + 0x90], 0
je 0x52c203
mov ecx, edi
call fcn.00510560
mov eax, dword [esp + 0x18]
mov dword [esp + 0x14], 0
test eax, eax
js 0x52c22d
and eax, 0x3fffffff
mov ecx, 0x7d8954
shl eax, 3
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x14]
call dword [eax + 0x10]
mov eax, dword [esp + 0x28]
mov dword [esp + 0x10], 0
mov dword [esp + 0x18], connect
mov dword [esp + 0x24], 0
test eax, eax
js 0x52c267
and eax, 0x3fffffff
mov ecx, 0x7d8954
shl eax, 2
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x24]
call dword [eax + 0x10]
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x20], 0
mov dword [esp + 0x28], connect
mov dword [esp + 0x38], 0
test eax, eax
js 0x52c2a1
and eax, 0x3fffffff
mov ecx, 0x7d8954
shl eax, 2
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x38]
call dword [eax + 0x10]
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x34], 0
mov dword [esp + 0x3c], connect
mov dword [esp + 0x48], 0
test eax, eax
js 0x52c2db
and eax, 0x3fffffff
mov ecx, 0x7d8954
shl eax, 2
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x48]
call dword [eax + 0x10]
mov eax, dword [esp + 0x98]
mov dword [esp + 0x44], 0
mov dword [esp + 0x4c], connect
mov dword [esp + 0x94], 0
test eax, eax
js 0x52c36a
and eax, 0x3fffffff
mov ecx, 0x7d8954
shl eax, 2
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x94]
call dword [eax + 0x10]
mov ecx, dword [esp + 0xe0]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xcc
jmp fcn.0045c160
push edi
push ecx
mov eax, esp
push ecx
mov byte [eax], bl
mov eax, esp
push ebp
mov byte [eax], bh
push dword [esp + 0xf0]
call fcn.0052c390
add esp, 0x14
test edi, edi
je 0x52c36a
push 1
push dword [esp + 0xf0]
mov ecx, edi
push dword [esp + 0xe8]
call fcn.0050c200
mov ecx, dword [esp + 0xe0]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xcc
jmp fcn.0045c160
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xcc
ret