Function at 0x10052e40
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
xor eax, eax
push edi
push dword [0x100c7608]
xor ecx, ecx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], ecx
xor ebx, ebx
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], 1
call esi
mov edi, eax
mov dword [ebp - 0x18], edi
test edi, edi
je 0x100532b6
mov eax, dword [edi + 0x7130]
push dword [0x100c7608]
mov dword [ebp - 0xc], eax
mov eax, dword [edi + 0x7134]
mov dword [ebp - 8], eax
lea eax, [edi + 0xc344]
mov dword [edi + 0x1b438], eax
movzx eax, word [edi + 0x7160]
dec eax
mov dword [edi + 0x1b53c], eax
call esi
mov esi, eax
test esi, esi
je 0x10052f8d
lea ecx, [esi + 0x1b53b]
mov dword [ebp - 0x24], 0x3fc0
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x30], 0x100
cmp dword [esi + 0x18378], 6
jge 0x10052ee5
mov ecx, esi
call fcn.1004f880
mov ecx, dword [ebp - 0x28]
mov al, byte [esi + 0x18374]
xor edx, edx
and al, 0x3f
mov dword [ebp - 0x2c], edx
mov byte [ecx], al
mov eax, dword [esi + 0x18378]
shr dword [esi + 0x18374], 6
add eax, 0xfffffffa
mov dword [esi + 0x18378], eax
cmp byte [ecx], dl
jbe 0x10052f78
mov edi, dword [ebp - 0x24]
cmp eax, 8
jge 0x10052f48
mov edx, esi
lea ecx, [ebp - 4]
call fcn.1004f8d0
cmp eax, 8
jne 0x10052f45
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 0x10052f16
mov edx, dword [ebp - 0x2c]
mov ecx, dword [esi + 0x1b438]
mov al, byte [esi + 0x18374]
add ecx, edi
mov byte [ecx + edx], al
inc edx
mov ecx, dword [ebp - 0x28]
add dword [esi + 0x18378], 0xfffffff8
shr dword [esi + 0x18374], 8
mov eax, dword [esi + 0x18378]
mov dword [ebp - 0x2c], edx
cmp dl, byte [ecx]
jb 0x10052f11
sub dword [ebp - 0x24], 0x40
dec ecx
sub dword [ebp - 0x30], 1
mov dword [ebp - 0x28], ecx
jne 0x10052ed2
mov edi, dword [ebp - 0x18]
cmp dword [ebp - 8], ebx
jl 0x100532ad
jg 0x10052fa1
cmp dword [ebp - 0xc], ebx
jbe 0x100532ad
cmp dword [edi + 4], 0
jne 0x100532ad
mov esi, dword [ebp - 0x10]
mov eax, dword [edi + 0x18378]
cmp byte [edi + esi + 0x1b43c], 0
jne 0x10052fe7
cmp eax, 8
jge 0x10052fca
mov ecx, edi
call fcn.1004f880
movzx eax, word [edi + 0x18374]
shr dword [edi + 0x18374], 8
add dword [edi + 0x18378], 0xfffffff8
movzx eax, al
jmp 0x10053081
cmp eax, 1
jge 0x10052ff3
mov ecx, edi
call fcn.1004f880
mov edx, dword [edi + 0x18378]
movzx ecx, word [edi + 0x18374]
dec edx
shr dword [edi + 0x18374], 1
mov dword [edi + 0x18378], edx
test cl, 1
je 0x10053038
cmp edx, 8
jge 0x10052fca
mov ecx, edi
call fcn.1004f880
movzx eax, word [edi + 0x18374]
shr dword [edi + 0x18374], 8
add dword [edi + 0x18378], 0xfffffff8
movzx eax, al
jmp 0x10053081
movzx eax, byte [edi + esi + 0x1b43c]
mov esi, dword [eax*4 + 0x100b0090]
cmp esi, edx
jle 0x10053052
mov ecx, edi
call fcn.1004f880
movzx eax, word [edi + 0x18374]
mov ecx, esi
movzx edx, word [esi*2 + 0x100b0540]
shr dword [edi + 0x18374], cl
and edx, eax
mov eax, dword [ebp - 0x10]
sub dword [edi + 0x18378], esi
shl eax, 6
add eax, dword [edi + 0x1b438]
movzx eax, byte [eax + edx]
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x10], eax
cmp ecx, 3
ja case.default.0x10053090
jmp dword [ecx*4 + 0x100532c0]
cmp eax, 0x90
je 0x100530f4
add dword [ebp - 0xc], 0xffffffff
adc dword [ebp - 8], 0xffffffff
cmp dword [edi + 0x34], 0
je 0x100530c9
cmp dword [edi + 0x3c], 0
je 0x100530c9
cmp dword [edi + 0x18370], 0
ja 0x100530c9
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
mov byte [edi + ebx + 0x8344], al
inc ebx
cmp ebx, 0x4000
jne case.default.0x10053090
mov edx, edi
mov ecx, ebx
call fcn.10055240
mov dword [ebp - 0x20], 0
xor ebx, ebx
jmp case.default.0x10053090
mov eax, 1
jmp 0x10053294
test eax, eax
je 0x1005312c
mov dword [ebp - 0x34], eax
xor ecx, ecx
mov eax, dword [edi + 0x1b53c]
mov eax, dword [eax*4 + 0x100b04d0]
mov edx, eax
and edx, dword [ebp - 0x10]
cmp edx, eax
mov dword [ebp - 0x1c], edx
setne cl
add ecx, 2
mov dword [ebp - 0x14], ecx
jmp case.default.0x10053090
add dword [ebp - 0xc], 0xffffffff
adc dword [ebp - 8], 0xffffffff
cmp dword [edi + 0x34], 0
je 0x10053157
cmp dword [edi + 0x3c], 0
je 0x10053157
cmp dword [edi + 0x18370], 0
ja 0x10053157
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
mov byte [edi + ebx + 0x8344], 0x90
inc ebx
cmp ebx, 0x4000
jne 0x10053292
mov edx, edi
mov ecx, ebx
call fcn.10055240
mov dword [ebp - 0x20], 0
xor ebx, ebx
jmp 0x10053292
add dword [ebp - 0x1c], eax
mov eax, 3
jmp 0x10053294
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x34]
add eax, 3
mov dword [ebp - 0x28], eax
mov eax, dword [edi + 0x1b53c]
mov edi, ebx
mov ecx, dword [eax*4 + 0x100b04b0]
sar edx, cl
and edx, dword [eax*4 + 0x100b0490]
mov eax, dword [ebp - 0x18]
shl edx, 8
sub edi, edx
mov edx, dword [ebp - 0x28]
sub edi, dword [ebp - 0x10]
dec edi
sub dword [ebp - 0xc], edx
sbb dword [ebp - 8], 0
cmp dword [eax + 0x34], 0
je 0x100531f0
cmp dword [eax + 0x3c], 0
je 0x100531f0
cmp dword [eax + 0x18370], 0
ja 0x100531f0
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
lea ecx, [ecx]
and edi, 0x3fff
mov ecx, edi
cmp edi, ebx
ja 0x100531fe
mov ecx, ebx
mov esi, 0x4000
sub esi, ecx
cmp esi, edx
jbe 0x1005320b
mov esi, edx
sub edx, esi
cmp dword [ebp - 0x20], 0
mov dword [ebp - 0x28], edx
je 0x1005322c
cmp ebx, edi
ja 0x1005322c
push esi
add eax, 0x8344
add eax, ebx
push 0
push eax
call fcn.1007cff0
jmp 0x10053260
lea ecx, [ebx + 0x8344]
add ecx, eax
lea edx, [eax + 0x8344]
mov eax, ebx
add edx, edi
sub eax, edi
cmp eax, esi
jae 0x10053258
mov al, byte [edx]
lea ecx, [ecx + 1]
inc ebx
mov byte [ecx - 1], al
inc edi
lea edx, [edx + 1]
sub esi, 1
jne 0x10053244
jmp 0x10053267
push esi
push edx
push ecx
call fcn.1007d410
add esp, 0xc
add ebx, esi
add edi, esi
cmp ebx, 0x4000
jne 0x10053282
mov edx, dword [ebp - 0x18]
mov ecx, ebx
call fcn.10055240
mov dword [ebp - 0x20], 0
xor ebx, ebx
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x18]
test edx, edx
jne 0x100531f0
mov edi, eax
xor eax, eax
mov dword [ebp - 0x14], eax
cmp dword [ebp - 8], 0
jg 0x10052fa1
jl 0x100532ad
cmp dword [ebp - 0xc], 0
ja 0x10052fa1
mov edx, edi
mov ecx, ebx
call fcn.10055240
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret