Function at 0x100528a0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
push edi
push dword [0x100c7608]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
je 0x10052e2c
or eax, 0xffffffff
mov dword [esi + 0x1b540], 9
mov dword [esi + 0x1b544], 0x1ff
lea edi, [esi + 0x8544]
mov dword [esi + 0x1b548], 0x2000
mov ecx, 0xf80
mov dword [esi + 0x1b54c], 0x101
rep stosd dword es:[edi], eax
lea ecx, [esi + 0x8542]
stosw word es:[edi], ax
mov eax, 0xff
xor edx, edx
lea ecx, [ecx - 2]
mov word [ecx + 2], dx
mov byte [esi + eax + 0xc348], al
sub eax, 1
jns 0x10052904
mov eax, dword [esi + 0x1b540]
cmp eax, dword [esi + 0x18378]
jle 0x1005292e
mov ecx, esi
call fcn.1004f880
mov ecx, dword [esi + 0x1b540]
movzx eax, word [esi + 0x18374]
shr dword [esi + 0x18374], cl
sub dword [esi + 0x18378], ecx
movzx edx, word [ecx*2 + 0x100b0540]
and edx, eax
cmp byte [esi + 0x1837c], 0
mov dword [ebp - 0x14], edx
jne 0x10052e2c
mov eax, dword [esi + 0x1a3fc]
mov dword [ebp - 0x18], edx
mov byte [eax], dl
mov eax, dword [esi + 0x1b408]
inc dword [esi + 0x1a3fc]
inc eax
mov dword [esi + 0x1b408], eax
cmp eax, dword [esi + 0x84]
jne 0x1005298e
mov ecx, esi
call fcn.1004fed0
cmp dword [esi + 4], 0
jne 0x10052e2c
mov ebx, 0x2000
mov edi, 0xffff8000
mov dword [ebp - 0x10], ebx
jmp 0x100529b0
cmp byte [esi + 0x1837c], 0
jne 0x10052e2c
mov eax, dword [esi + 0x18378]
cmp dword [esi + 0x1b540], eax
jle 0x100529ff
cmp eax, 0x19
jge 0x100529ff
mov edx, esi
lea ecx, [ebp - 4]
call fcn.1004f8d0
cmp eax, 8
jne 0x100529ff
mov ecx, dword [esi + 0x18378]
movzx eax, word [ebp - 4]
shl eax, cl
or dword [esi + 0x18374], eax
lea eax, [ecx + 8]
mov dword [esi + 0x18378], eax
cmp eax, 0x19
jl 0x100529d0
mov ecx, dword [esi + 0x1b540]
movzx eax, word [esi + 0x18374]
shr dword [esi + 0x18374], cl
movzx edx, word [ecx*2 + 0x100b0540]
and edx, eax
mov eax, dword [esi + 0x18378]
sub eax, ecx
cmp byte [esi + 0x1837c], 0
mov dword [esi + 0x18378], eax
jne 0x10052e2c
cmp edx, 0x100
jne 0x10052c33
cmp ecx, eax
jle 0x10052a7f
cmp eax, 0x19
jge 0x10052a7f
lea esp, [esp]
mov edx, esi
lea ecx, [ebp - 8]
call fcn.1004f8d0
cmp eax, 8
jne 0x10052a7f
mov ecx, dword [esi + 0x18378]
movzx eax, word [ebp - 8]
shl eax, cl
or dword [esi + 0x18374], eax
lea eax, [ecx + 8]
mov dword [esi + 0x18378], eax
cmp eax, 0x19
jl 0x10052a50
mov ecx, dword [esi + 0x1b540]
movzx eax, word [esi + 0x18374]
shr dword [esi + 0x18374], cl
sub dword [esi + 0x18378], ecx
movzx edx, word [ecx*2 + 0x100b0540]
and edx, eax
sub edx, 1
je 0x10052b86
sub edx, 1
jne 0x10052ba8
mov eax, dword [esi + 0x1b54c]
mov edx, 0x101
cmp eax, edx
jle 0x10052ae1
lea ecx, [esi + 0x8546]
lea esp, [esp]
or word [ecx], di
lea ecx, [ecx + 2]
mov eax, dword [esi + 0x1b54c]
inc edx
cmp edx, eax
jl 0x10052ad0
mov edx, 0x101
cmp eax, edx
jle 0x10052b2d
lea ecx, [esi + 0x8546]
mov ebx, 0x7fff
jmp 0x10052b00
movsx eax, word [ecx]
and eax, 0x7fff
cmp eax, 0x101
jb 0x10052b17
and word [esi + eax*2 + 0x8344], bx
mov eax, dword [esi + 0x1b54c]
inc edx
add ecx, 2
cmp edx, eax
jl 0x10052b00
mov ebx, dword [ebp - 0x10]
mov edi, 0xffff8000
mov ecx, 0x101
cmp eax, ecx
jle 0x10052b58
lea eax, [esi + 0x8546]
or ebx, 0xffffffff
nop
cmp word [eax], 0
jge 0x10052b49
mov word [eax], bx
inc ecx
add eax, 2
cmp ecx, dword [esi + 0x1b54c]
jl 0x10052b40
mov ebx, dword [ebp - 0x10]
mov edx, dword [esi + 0x1b548]
mov ecx, 0x101
cmp edx, ecx
jle 0x10052b7e
lea eax, [esi + 0x8546]
lea ecx, [ecx]
cmp word [eax], 0xffff
je 0x10052b7e
inc ecx
add eax, 2
cmp ecx, edx
jl 0x10052b70
mov dword [esi + 0x1b54c], ecx
jmp 0x10052ba8
inc ecx
mov dword [esi + 0x1b540], ecx
cmp ecx, 0xd
jne 0x10052b9a
mov eax, dword [esi + 0x1b548]
jmp 0x10052ba2
mov eax, 1
shl eax, cl
dec eax
mov dword [esi + 0x1b544], eax
mov eax, dword [esi + 0x18378]
cmp dword [esi + 0x1b540], eax
jle 0x10052bef
cmp eax, 0x19
jge 0x10052bef
jmp 0x10052bc0
mov edx, esi
lea ecx, [ebp - 0xc]
call fcn.1004f8d0
cmp eax, 8
jne 0x10052bef
mov ecx, dword [esi + 0x18378]
movzx eax, word [ebp - 0xc]
shl eax, cl
or dword [esi + 0x18374], eax
lea eax, [ecx + 8]
mov dword [esi + 0x18378], eax
cmp eax, 0x19
jl 0x10052bc0
mov ecx, dword [esi + 0x1b540]
movzx eax, word [esi + 0x18374]
shr dword [esi + 0x18374], cl
movzx edx, word [ecx*2 + 0x100b0540]
and edx, eax
mov eax, dword [esi + 0x18378]
sub eax, ecx
cmp byte [esi + 0x1837c], 0
mov dword [esi + 0x18378], eax
jne 0x10052e2c
cmp edx, 0x100
je 0x10052a43
cmp word [esi + edx*2 + 0x8344], 0xffff
mov dword [ebp - 0x1c], edx
jne 0x10052c5e
sub ebx, 1
mov dword [ebp - 0x10], ebx
js 0x10052e2c
mov eax, dword [ebp - 0x18]
mov byte [ebx + esi + 0xe34a], al
mov eax, dword [ebp - 0x14]
mov edx, eax
jmp 0x10052c61
mov eax, dword [ebp - 0x14]
cmp edx, 0x101
jb 0x10052cc3
lea ecx, [esi + 0xe34a]
add ecx, ebx
cmp word [esi + edx*2 + 0x8344], 0xffff
lea edi, [esi + edx*2]
lea ecx, [ecx - 1]
jne 0x10052c96
test ebx, ebx
jle 0x10052e2c
mov edx, dword [ebp - 0x18]
mov byte [ecx], dl
mov edx, eax
or eax, 0xffffffff
jmp 0x10052cb3
test ebx, ebx
jle 0x10052e2c
mov al, byte [edx + esi + 0xc348]
mov byte [ecx], al
mov eax, 0xffffffff
movsx edx, word [edi + 0x8344]
add ebx, eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x10], ebx
cmp edx, 0x101
jge 0x10052c71
mov bl, byte [edx + esi + 0xc348]
mov edx, dword [ebp - 0x10]
movzx eax, bl
sub edx, 1
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x10], edx
js 0x10052e2c
lea edi, [edx + 0xe34a]
movzx eax, dx
add edi, esi
mov byte [edi], bl
movzx ecx, word [esi + 0x1b408]
sub ecx, eax
movzx eax, word [esi + 0x84]
add ecx, 0x2000
cmp ecx, eax
jge 0x10052d46
mov eax, 0x2000
sub eax, edx
push eax
push edi
push dword [esi + 0x1a3fc]
call fcn.1007d410
mov eax, 0x2000
mov ecx, 0x2000
sub eax, dword [ebp - 0x10]
add esp, 0xc
add dword [esi + 0x1a3fc], eax
mov eax, 0x2000
sub eax, dword [ebp - 0x10]
add dword [esi + 0x1b408], eax
mov dword [ebp - 0x10], ecx
jmp 0x10052dd6
cmp dword [esi + 4], 0
jne 0x10052dd6
cmp byte [esi + 0x1837c], 0
jne 0x10052dd6
cmp edx, 0x2000
jge 0x10052dd6
mov ecx, dword [esi + 0x1a3fc]
inc edx
mov al, byte [edi]
inc edi
mov dword [ebp - 0x10], edx
mov byte [ecx], al
inc dword [esi + 0x1b408]
inc dword [esi + 0x1a3fc]
mov eax, dword [esi + 0x1b408]
cmp eax, dword [esi + 0x84]
jne 0x10052dcc
mov ecx, esi
call fcn.1004fed0
test eax, eax
je 0x10052da4
mov dword [esi + 4], 1
mov eax, dword [esi + 0x611c]
cmp eax, dword [esi + 0x7134]
jl 0x10052dc9
jg 0x10052dc2
mov eax, dword [esi + 0x6118]
cmp eax, dword [esi + 0x7130]
jb 0x10052dc9
mov byte [esi + 0x1837c], 1
mov edx, dword [ebp - 0x10]
cmp dword [esi + 4], 0
je 0x10052d50
mov eax, dword [esi + 0x1b54c]
cmp eax, dword [esi + 0x1b548]
jge 0x10052e14
mov edx, dword [ebp - 0x14]
lea ecx, [eax + 0x41a2]
lea ecx, [esi + ecx*2]
mov word [ecx], dx
mov byte [eax + esi + 0xc348], bl
mov edx, dword [esi + 0x1b548]
inc eax
lea ecx, [ecx + 2]
cmp eax, edx
jge 0x10052e0e
cmp word [ecx], 0xffff
jne 0x10052e00
mov dword [esi + 0x1b54c], eax
cmp dword [esi + 4], 0
mov edi, 0xffff8000
mov edx, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x10]
mov dword [ebp - 0x14], edx
je 0x100529b0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret