Function at 0x100552d0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
push edi
push dword [0x100c7608]
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x1c], ecx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
mov dword [ebp - 0xc], ebx
test ebx, ebx
je 0x10055695
mov eax, dword [ebp + 8]
mov ecx, dword [ebx + 0x1b420]
mov edi, dword [ebx + 0x1b428]
mov esi, dword [ebx + 0x1b42c]
movzx edx, word [eax*2 + 0x100b0540]
mov dword [ebp - 0x18], edx
mov edx, dword [ebp + 0xc]
mov dword [ebp - 4], ecx
mov dword [ebx + 0x1b424], ecx
movzx edx, word [edx*2 + 0x100b0540]
mov dword [ebp - 0x20], edx
nop
cmp dword [ebx + 4], 0
jne 0x1005566c
cmp esi, eax
jae 0x10055368
lea eax, [ebx + 0x1b430]
mov edx, ebx
mov ecx, eax
call fcn.1004f8d0
movzx eax, word [ebx + 0x1b430]
mov ecx, esi
shl eax, cl
add esi, 8
or edi, eax
lea eax, [ebx + 0x1b430]
cmp esi, dword [ebp + 8]
jb 0x10055344
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
and eax, edi
movzx edx, byte [ecx + eax*8]
lea eax, [ecx + eax*8]
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], edx
cmp edx, 0x10
jbe 0x100553eb
cmp edx, 0x63
je 0x10055695
movzx ecx, byte [eax + 1]
sub edx, 0x10
sub esi, ecx
shr edi, cl
mov dword [ebp - 8], edx
cmp esi, edx
jae 0x100553cc
lea eax, [ebx + 0x1b430]
mov edx, ebx
mov ecx, eax
call fcn.1004f8d0
movzx eax, word [ebx + 0x1b430]
mov ecx, esi
mov edx, dword [ebp - 8]
add esi, 8
shl eax, cl
or edi, eax
lea eax, [ebx + 0x1b430]
cmp esi, edx
jb 0x100553a3
mov eax, dword [ebp - 0x10]
movzx ecx, word [edx*2 + 0x100b0540]
mov eax, dword [eax + 4]
and ecx, edi
movzx edx, byte [eax + ecx*8]
lea eax, [eax + ecx*8]
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], edx
cmp edx, 0x10
ja 0x10055382
movzx ecx, byte [eax + 1]
shr edi, cl
sub esi, ecx
cmp edx, 0x10
jne 0x10055426
mov ecx, dword [ebp - 4]
mov al, byte [eax + 4]
mov byte [ecx + ebx + 0x8344], al
inc ecx
mov dword [ebp - 4], ecx
cmp ecx, 0x8000
jne 0x10055645
mov edx, ebx
call fcn.10055240
xor ecx, ecx
mov dword [ebp - 4], ecx
jmp 0x10055645
cmp edx, 0xf
je 0x10055669
cmp esi, edx
jae 0x10055469
lea eax, [ebx + 0x1b430]
lea esp, [esp]
mov edx, ebx
mov ecx, eax
call fcn.1004f8d0
movzx eax, word [ebx + 0x1b430]
mov ecx, esi
mov edx, dword [ebp - 8]
add esi, 8
shl eax, cl
or edi, eax
lea eax, [ebx + 0x1b430]
cmp esi, edx
jb 0x10055440
mov eax, dword [ebp - 0x10]
movzx ecx, word [edx*2 + 0x100b0540]
sub esi, edx
movzx eax, word [eax + 4]
and ecx, edi
add ecx, eax
mov dword [ebp - 0x14], ecx
mov ecx, edx
shr edi, cl
cmp esi, dword [ebp + 0xc]
jae 0x100554b4
lea eax, [ebx + 0x1b430]
lea ecx, [ecx]
mov edx, ebx
mov ecx, eax
call fcn.1004f8d0
movzx eax, word [ebx + 0x1b430]
mov ecx, esi
shl eax, cl
add esi, 8
or edi, eax
lea eax, [ebx + 0x1b430]
cmp esi, dword [ebp + 0xc]
jb 0x10055490
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x24]
and eax, edi
lea ecx, [ecx + eax*8]
movzx eax, byte [ecx]
mov dword [ebp - 0x10], ecx
mov dword [ebp - 8], eax
cmp eax, 0x10
jbe 0x10055536
lea ecx, [ecx]
cmp eax, 0x63
je 0x10055695
movzx ecx, byte [ecx + 1]
sub eax, 0x10
sub esi, ecx
shr edi, cl
mov dword [ebp - 8], eax
cmp esi, eax
jae 0x10055515
lea ecx, [ebx + 0x1b430]
mov edx, ebx
call fcn.1004f8d0
movzx eax, word [ebx + 0x1b430]
mov ecx, esi
shl eax, cl
add esi, 8
or edi, eax
lea ecx, [ebx + 0x1b430]
mov eax, dword [ebp - 8]
cmp esi, eax
jb 0x100554f1
movzx ecx, word [eax*2 + 0x100b0540]
mov eax, dword [ebp - 0x10]
and ecx, edi
mov eax, dword [eax + 4]
lea ecx, [eax + ecx*8]
movzx eax, byte [ecx]
mov dword [ebp - 0x10], ecx
mov dword [ebp - 8], eax
cmp eax, 0x10
ja 0x100554d0
movzx ecx, byte [ecx + 1]
sub esi, ecx
shr edi, cl
cmp esi, eax
jae 0x1005556c
lea ecx, [ebx + 0x1b430]
mov edx, ebx
call fcn.1004f8d0
movzx eax, word [ebx + 0x1b430]
mov ecx, esi
shl eax, cl
add esi, 8
or edi, eax
lea ecx, [ebx + 0x1b430]
mov eax, dword [ebp - 8]
cmp esi, eax
jb 0x10055548
movzx eax, word [eax*2 + 0x100b0540]
mov edx, dword [ebp - 4]
and eax, edi
mov ecx, dword [ebp - 8]
sub edx, eax
mov eax, dword [ebp - 0x10]
shr edi, cl
mov dword [ebp - 0x2c], edi
mov edi, dword [ebp - 0x14]
movzx eax, word [eax + 4]
sub edx, eax
sub esi, ecx
mov dword [ebp - 0x28], esi
mov esi, dword [ebp - 4]
jmp 0x100555a0
and edx, 0x7fff
mov dword [ebp - 8], edx
mov eax, edx
cmp edx, esi
ja 0x100555b1
mov eax, esi
mov ebx, 0x8000
sub ebx, eax
cmp ebx, edi
jbe 0x100555be
mov ebx, edi
mov ecx, dword [ebp - 0xc]
mov eax, esi
sub eax, edx
sub edi, ebx
cmp eax, ebx
mov dword [ebp - 0x14], edi
lea eax, [ecx + 0x8344]
jb 0x100555f0
add eax, edx
push ebx
push eax
lea eax, [ecx + 0x8344]
add eax, esi
push eax
call fcn.1007d410
add esp, 0xc
add esi, ebx
add dword [ebp - 8], ebx
jmp 0x10055618
add eax, esi
lea edi, [ecx + 0x8344]
mov dword [ebp - 0x10], eax
add edi, edx
mov ecx, eax
nop
mov al, byte [edi]
lea ecx, [ecx + 1]
inc esi
mov byte [ecx - 1], al
inc edx
lea edi, [edi + 1]
sub ebx, 1
jne 0x10055600
mov edi, dword [ebp - 0x14]
mov dword [ebp - 8], edx
mov ebx, dword [ebp - 0xc]
cmp esi, 0x8000
jne 0x1005562e
mov edx, ebx
mov ecx, esi
call fcn.10055240
xor esi, esi
mov edx, dword [ebp - 8]
test edi, edi
jne 0x100555a0
mov edi, dword [ebp - 0x2c]
mov dword [ebp - 4], esi
mov esi, dword [ebp - 0x28]
mov ecx, dword [ebp - 4]
cmp byte [ebx + 0x1837c], 0
je 0x10055657
cmp dword [ebx + 0x18370], 0
jbe 0x1005566c
cmp dword [ebx + 0x1b410], 1
mov eax, dword [ebp + 8]
jle 0x10055330
jmp 0x1005566c
mov ecx, dword [ebp - 4]
xor eax, eax
mov dword [ebx + 0x1b420], ecx
mov dword [ebx + 0x1b428], edi
mov dword [ebx + 0x1b42c], esi
cmp dword [ebx + 0x34], eax
jne 0x1005569a
cmp byte [ebx + 0x1837c], al
setne al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret