Function at 0x529530
Capabilities:
Get thread local storage value
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
mov eax, dword [ebp + 0xc]
sub esp, 0x58
push esi
push edi
mov edi, dword [ebp + 8]
cmp dword [edi + 0x94], 0
je 0x529565
mov dword [esp + 0x14], eax
mov ecx, edi
lea eax, [esp + 0x10]
mov byte [esp + 0x10], 3
push eax
call fcn.00510450
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov dword [esp + 8], eax
mov eax, dword [eax + 0x10]
mov dword [edi + 0x94], 1
test eax, eax
je 0x5298a3
mov esi, dword [edi + 0x348]
mov ecx, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], connect
mov dword [esp + 0x3c], esi
test esi, esi
je 0x5295f8
push dword [0x884adc]
call ecx
mov ecx, eax
lea edx, [esi*8 + 0x7f]
and edx, 0xffffff80
mov eax, dword [ecx + 0xc]
lea edi, [eax + edx]
mov dword [esp + 0xc], edi
mov edi, dword [ebp + 8]
cmp edx, dword [ecx + 8]
jg 0x5295ea
lea edi, [eax + edx]
cmp edi, dword [ecx + 0x10]
mov edi, dword [ebp + 8]
ja 0x5295ea
mov edx, dword [esp + 0xc]
mov dword [ecx + 0xc], edx
mov ecx, dword [sym.imp.KERNEL32.dll_TlsGetValue]
jmp 0x5295fa
push edx
call fcn.0046a3c0
mov ecx, dword [sym.imp.KERNEL32.dll_TlsGetValue]
jmp 0x5295fa
xor eax, eax
or esi, 0x80000000
mov dword [esp + 0x2c], eax
mov dword [esp + 0x34], esi
mov esi, dword [edi + 0x348]
mov dword [esp + 0x38], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], connect
mov dword [esp + 0x28], esi
test esi, esi
je 0x529674
push dword [0x884adc]
call ecx
mov ecx, eax
lea edx, [esi*8 + 0x7f]
and edx, 0xffffff80
mov eax, dword [ecx + 0xc]
lea edi, [eax + edx]
mov dword [esp + 0xc], edi
mov edi, dword [ebp + 8]
cmp edx, dword [ecx + 8]
jg 0x52966c
lea edi, [eax + edx]
cmp edi, dword [ecx + 0x10]
mov edi, dword [ebp + 8]
ja 0x52966c
mov edx, dword [esp + 0xc]
mov dword [ecx + 0xc], edx
jmp 0x529676
push edx
call fcn.0046a3c0
jmp 0x529676
xor eax, eax
or esi, 0x80000000
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], esi
mov esi, dword [esp + 8]
mov dword [esp + 0x24], eax
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x40]
jbe 0x5296a5
push 1
lea eax, [ebp + 0xc]
push eax
push dword [edi + 0x78]
call fcn.005269a0
add esp, 0xc
movzx ecx, byte [esi + 0x3f]
movzx edx, byte [esi + 0x3c]
mov eax, dword [esi + 0x30]
shl edx, cl
sub eax, edx
movzx edx, byte [esi + 0x3d]
mov dword [esp + 0x40], eax
mov eax, dword [esi + 0x34]
shl edx, cl
sub eax, edx
movzx edx, byte [esi + 0x3e]
mov dword [esp + 0x44], eax
mov eax, dword [esi + 0x38]
shl edx, cl
sub eax, edx
lea edx, [esp + 0x18]
mov dword [esp + 0x48], eax
movzx eax, byte [esi + 0x4c]
shl eax, cl
add eax, dword [esi + 0x40]
mov dword [esp + 0x50], eax
movzx eax, byte [esi + 0x4d]
shl eax, cl
add eax, dword [esi + 0x44]
mov dword [esp + 0x54], eax
movzx eax, byte [esi + 0x4e]
push edx
shl eax, cl
lea edx, [esp + 0x30]
add eax, dword [esi + 0x48]
mov ecx, dword [edi + 0x58]
push edx
mov dword [esp + 0x60], eax
lea edx, [esp + 0x48]
lea eax, [esi + 0x24]
push 1
mov dword [esp + 0x1c], eax
mov eax, dword [ecx]
push edx
lea edx, [esp + 0x20]
push edx
call dword [eax + 0x30]
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x1c]
add eax, ecx
test eax, eax
jle 0x529775
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x30]
push eax
call fcn.006aef90
mov ecx, dword [edi + 0x64]
add esp, 8
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call fcn.006af340
mov eax, dword [edi + 0x7c]
test eax, eax
je 0x52975e
add eax, 8
jmp 0x529760
xor eax, eax
mov ecx, dword [edi + 0x64]
push eax
push dword [esp + 0x34]
push dword [esp + 0x34]
call fcn.006af2d0
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
xor edx, edx
cmp eax, dword [esp + 0x18]
push dword [0x884adc]
mov dword [esp + 0xc], eax
cmove ecx, edx
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x20], ecx
lea esi, [eax*8 + 0x7f]
and esi, 0xffffff80
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edx, eax
lea eax, [esi + 0xf]
and eax, 0xfffffff0
mov dword [esp + 0xc], eax
mov eax, dword [esp + 8]
cmp esi, dword [edx + 8]
mov esi, dword [esp + 0xc]
jg 0x5297cf
lea ecx, [esi + eax]
cmp ecx, dword [edx + 0xc]
jne 0x5297cf
cmp dword [edx + 0x14], eax
je 0x5297cf
mov dword [edx + 0xc], eax
jmp 0x5297d8
push esi
push eax
mov ecx, edx
call fcn.0046a590
mov eax, dword [esp + 0x20]
mov dword [esp + 0x1c], 0
test eax, eax
js 0x529802
and eax, 0x3fffffff
mov ecx, 0x7d8954
shl eax, 3
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x1c]
call dword [eax + 0x10]
mov ecx, dword [esp + 0x38]
xor edx, edx
mov eax, dword [esp + 0x30]
cmp ecx, dword [esp + 0x2c]
push dword [0x884adc]
cmove eax, edx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0x24], connect
mov dword [esp + 0x10], ecx
lea esi, [eax*8 + 0x7f]
and esi, 0xffffff80
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edx, eax
lea eax, [esi + 0xf]
and eax, 0xfffffff0
mov dword [esp + 8], eax
mov eax, dword [esp + 0xc]
cmp esi, dword [edx + 8]
mov esi, dword [esp + 8]
jg 0x529870
lea ecx, [esi + eax]
cmp ecx, dword [edx + 0xc]
jne 0x529870
cmp dword [edx + 0x14], eax
je 0x529870
mov dword [edx + 0xc], eax
jmp 0x529879
push esi
push eax
mov ecx, edx
call fcn.0046a590
mov eax, dword [esp + 0x34]
mov dword [esp + 0x30], 0
test eax, eax
js 0x5298a3
and eax, 0x3fffffff
mov ecx, 0x7d8954
shl eax, 3
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x30]
call dword [eax + 0x10]
add dword [edi + 0x94], 0xffffffff
jne 0x5298de
cmp byte [edi + 0x9c], 0
jne 0x5298de
cmp dword [edi + 0x8c], 0
je 0x5298c5
mov ecx, edi
call fcn.00510540
cmp dword [edi + 0xa4], 1
jne 0x5298de
cmp dword [edi + 0x90], 0
je 0x5298de
mov ecx, edi
call fcn.00510560
pop edi
pop esi
mov esp, ebp
pop ebp
ret