Function at 0x10006170
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x34
mov eax, dword [0x1002b150]
push ebx
push esi
push edi
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
lea ecx, [eax + 0x7e8]
lea edx, [eax + 0x8e8]
lea ebx, [eax + 0x9e8]
mov dword [esp + 0x24], ecx
lea ecx, [eax + 0xae8]
mov dword [esp + 0x18], edx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], ecx
cmp dword [eax + 0x7b8], 3
jne 0x10006487
mov dword [esp + 0x40], 8
mov eax, dword [esp + 0x48]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x38], 4
mov eax, dword [eax]
mov ecx, dword [esp + 0x20]
mov ecx, dword [ecx]
and ecx, 0xffc0
shr ecx, 4
add ecx, 0x1002f360
add dword [esp + 0x20], 4
movsx edi, word [ecx]
movsx esi, word [ecx + 2]
mov ecx, dword [esp + 0x1c]
mov ecx, dword [ecx]
and ecx, 0xffc0
shr ecx, 4
add ecx, 0x10030360
add dword [esp + 0x1c], 4
movsx edx, word [ecx]
movsx ebp, word [ecx + 2]
add esi, edx
mov ecx, dword [esp + 0x24]
mov ebx, dword [ecx]
xor ebx, 0xffff8003
and ebx, 0xfffc
shr ebx, 2
add dword [esp + 0x24], 4
lea ecx, [edi + ebx]
lea edx, [esi + ebx]
add ebx, ebp
test ch, 0xc0
je 0x10006254
and ecx, 0x8000
cmp ecx, 1
sbb ecx, ecx
and ecx, 0xff
jmp 0x10006257
sar ecx, 6
test dh, 0xc0
je 0x1000626f
and edx, 0x8000
cmp edx, 1
sbb edx, edx
and edx, 0xff
jmp 0x10006272
sar edx, 6
test bh, 0xc0
je 0x1000628a
and ebx, 0x8000
cmp ebx, 1
sbb ebx, ebx
and ebx, 0xff
jmp 0x1000628d
sar ebx, 6
mov byte [eax], cl
mov ecx, dword [esp + 0x24]
mov byte [eax + 1], dl
mov byte [eax + 2], bl
mov ebx, dword [ecx]
xor ebx, 0xffff8003
and ebx, 0xfffc
shr ebx, 2
add dword [esp + 0x24], 4
lea ecx, [edi + ebx]
lea edx, [esi + ebx]
add ebx, ebp
test ch, 0xc0
je 0x100062cf
and ecx, 0x8000
cmp ecx, 1
sbb ecx, ecx
and ecx, 0xff
jmp 0x100062d2
sar ecx, 6
test dh, 0xc0
je 0x100062ea
and edx, 0x8000
cmp edx, 1
sbb edx, edx
and edx, 0xff
jmp 0x100062ed
sar edx, 6
test bh, 0xc0
je 0x10006305
and ebx, 0x8000
cmp ebx, 1
sbb ebx, ebx
and ebx, 0xff
jmp 0x10006308
sar ebx, 6
mov byte [eax + 3], cl
add eax, 6
dec dword [esp + 0x38]
mov byte [eax - 2], dl
mov byte [eax - 1], bl
jne 0x100061d6
mov dword [esp + 0x38], 4
mov ecx, dword [esp + 0x20]
mov ecx, dword [ecx]
and ecx, 0xffc0
shr ecx, 4
add ecx, 0x1002f360
add dword [esp + 0x20], 4
movsx ebp, word [ecx]
movsx edi, word [ecx + 2]
mov ecx, dword [esp + 0x1c]
mov ecx, dword [ecx]
and ecx, 0xffc0
shr ecx, 4
add ecx, 0x10030360
add dword [esp + 0x1c], 4
movsx edx, word [ecx]
movsx esi, word [ecx + 2]
add edi, edx
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx]
xor edx, 0xffff8003
and edx, 0xfffc
shr edx, 2
add dword [esp + 0x18], 4
lea ebx, [ebp + edx]
lea ecx, [edi + edx]
add edx, esi
test bh, 0xc0
je 0x100063a5
and ebx, 0x8000
cmp ebx, 1
sbb ebx, ebx
and ebx, 0xff
jmp 0x100063a8
sar ebx, 6
test ch, 0xc0
je 0x100063c0
and ecx, 0x8000
cmp ecx, 1
sbb ecx, ecx
and ecx, 0xff
jmp 0x100063c3
sar ecx, 6
test dh, 0xc0
je 0x100063db
and edx, 0x8000
cmp edx, 1
sbb edx, edx
and edx, 0xff
jmp 0x100063de
sar edx, 6
mov byte [eax], bl
mov byte [eax + 1], cl
mov ecx, dword [esp + 0x18]
mov byte [eax + 2], dl
mov ebx, dword [ecx]
xor ebx, 0xffff8003
and ebx, 0xfffc
shr ebx, 2
add dword [esp + 0x18], 4
lea ecx, [ebp + ebx]
lea edx, [edi + ebx]
add ebx, esi
test ch, 0xc0
je 0x10006421
and ecx, 0x8000
cmp ecx, 1
sbb ecx, ecx
and ecx, 0xff
jmp 0x10006424
sar ecx, 6
test dh, 0xc0
je 0x1000643c
and edx, 0x8000
cmp edx, 1
sbb edx, edx
and edx, 0xff
jmp 0x1000643f
sar edx, 6
test bh, 0xc0
je 0x10006457
and ebx, 0x8000
cmp ebx, 1
sbb ebx, ebx
and ebx, 0xff
jmp 0x1000645a
sar ebx, 6
mov byte [eax + 3], cl
add eax, 6
dec dword [esp + 0x38]
mov byte [eax - 2], dl
mov byte [eax - 1], bl
jne 0x10006326
add dword [esp + 0x3c], 4
dec dword [esp + 0x40]
jne 0x100061c8
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x34
ret
mov dword [esp + 0x14], 0x1002d668
mov ecx, dword [esp + 0x48]
mov dword [esp + 0x40], ecx
mov dword [esp + 0x28], 0
mov dword [esp + 0x3c], 1
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x38], 4
mov edi, dword [ecx]
mov ecx, dword [esp + 0x20]
mov ecx, dword [ecx]
and ecx, 0xffc0
shr ecx, 4
add ecx, 0x1002f360
add dword [esp + 0x20], 4
movsx esi, word [ecx]
movsx ebp, word [ecx + 2]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x30], esi
mov ecx, dword [ecx]
and ecx, 0xffc0
shr ecx, 4
add ecx, 0x10030360
add dword [esp + 0x1c], 4
movsx edx, word [ecx]
movsx esi, word [ecx + 2]
add ebp, edx
mov ecx, dword [esp + 0x24]
add dword [esp + 0x24], 4
mov edx, dword [ecx]
mov dword [esp + 0x2c], esi
xor edx, 0xffff8003
mov esi, dword [esp + 0x30]
and edx, 0xfffc
shr edx, 2
add esi, edx
lea ecx, [ebp + edx]
add edx, dword [esp + 0x2c]
mov dword [esp + 0x10], esi
test esi, 0xc000
je 0x1000654c
and esi, 0x8000
cmp esi, 1
sbb esi, esi
and esi, 0xff
mov dword [esp + 0x10], esi
jmp 0x10006551
sar dword [esp + 0x10], 6
test ch, 0xc0
je 0x10006569
and ecx, 0x8000
cmp ecx, 1
sbb ecx, ecx
and ecx, 0xff
jmp 0x1000656c
sar ecx, 6
test dh, 0xc0
je 0x10006584
and edx, 0x8000
cmp edx, 1
sbb edx, edx
and edx, 0xff
jmp 0x10006587
sar edx, 6
mov esi, dword [eax + 0x7b8]
cmp esi, 1
je 0x100065df
cmp esi, 4
je 0x10006658
cmp esi, 0xa
je 0x1000666c
shr edx, 1
inc edi
and dl, 0x7c
inc edi
mov dword [esp + 0x34], ecx
and byte [esp + 0x34], 0x38
sar ecx, 6
mov ebx, dword [esp + 0x34]
shl bl, 2
or dl, cl
mov byte [esp + 0x34], bl
mov ebx, dword [esp + 0x10]
sar ebx, 3
or byte [esp + 0x34], bl
mov bl, byte [esp + 0x34]
mov byte [edi - 2], bl
mov byte [edi - 1], dl
jmp 0x100066a2
mov ebx, dword [esp + 0x28]
mov esi, dword [esp + 0x14]
and ebx, 3
mov esi, dword [esi + ebx*8]
mov ebx, dword [esp + 0x10]
sar esi, 3
sub esi, 0x10
add ebx, esi
cmp ebx, 0xff
jl 0x10006606
mov ebx, 0xff
test ebx, ebx
jg 0x1000660c
xor ebx, ebx
mov dword [esp + 0x10], ebx
lea ebx, [esi + ecx]
cmp ebx, 0xff
jl 0x10006620
mov ebx, 0xff
test ebx, ebx
jg 0x10006626
xor ebx, ebx
add edx, esi
cmp edx, 0xff
jl 0x10006635
mov edx, 0xff
test edx, edx
jg 0x1000663b
xor edx, edx
shr ebx, 3
mov ecx, dword [esp + 0x10]
shr ecx, 6
and bl, 0x1c
and cl, 3
and dl, 0xe0
or cl, bl
inc edi
or cl, dl
mov byte [edi - 1], cl
jmp 0x100066a2
mov bl, byte [esp + 0x10]
mov byte [edi], bl
mov byte [edi + 1], cl
mov byte [edi + 2], dl
add edi, dword [eax + 0x7b8]
jmp 0x100066a2
mov ebx, dword [esp + 0x28]
mov esi, dword [esp + 0x14]
and ebx, 3
mov esi, dword [esi + ebx*8]
mov bl, 4
cmp dword [esp + 0x10], esi
jg 0x10006684
xor bl, bl
cmp edx, esi
setg dl
or bl, dl
cmp ecx, esi
mov cl, 2
jg 0x10006693
xor cl, cl
or bl, cl
xor ecx, ecx
mov cl, bl
test ecx, ecx
je 0x100066a0
or ecx, 8
mov byte [edi], cl
mov ecx, dword [esp + 0x24]
mov esi, dword [esp + 0x30]
add dword [esp + 0x24], 4
mov edx, dword [ecx]
xor edx, 0xffff8003
and edx, 0xfffc
shr edx, 2
add esi, edx
lea ecx, [ebp + edx]
add edx, dword [esp + 0x2c]
mov dword [esp + 0x10], esi
test esi, 0xc000
je 0x100066ed
and esi, 0x8000
cmp esi, 1
sbb esi, esi
and esi, 0xff
mov dword [esp + 0x10], esi
jmp 0x100066f2
sar dword [esp + 0x10], 6
test ch, 0xc0
je 0x1000670a
and ecx, 0x8000
cmp ecx, 1
sbb ecx, ecx
and ecx, 0xff
jmp 0x1000670d
sar ecx, 6
test dh, 0xc0
je 0x10006725
and edx, 0x8000
cmp edx, 1
sbb edx, edx
and edx, 0xff
jmp 0x10006728
sar edx, 6
mov esi, dword [eax + 0x7b8]
cmp esi, 1
je 0x10006780
cmp esi, 4
je 0x100067f8
cmp esi, 0xa
je 0x1000680c
shr edx, 1
inc edi
and dl, 0x7c
inc edi
mov dword [esp + 0x34], ecx
and byte [esp + 0x34], 0x38
sar ecx, 6
mov ebx, dword [esp + 0x34]
shl bl, 2
or dl, cl
mov byte [esp + 0x34], bl
mov ebx, dword [esp + 0x10]
sar ebx, 3
or byte [esp + 0x34], bl
mov bl, byte [esp + 0x34]
mov byte [edi - 2], bl
mov byte [edi - 1], dl
jmp 0x10006851
mov ebx, dword [esp + 0x38]
mov esi, dword [esp + 0x14]
and ebx, 0x1c
mov ebx, dword [ebx + esi]
mov esi, dword [esp + 0x10]
sar ebx, 3
sub ebx, 0x10
add esi, ebx
cmp esi, 0xff
jl 0x100067a7
mov esi, 0xff
test esi, esi
jg 0x100067ad
xor esi, esi
add ecx, ebx
mov dword [esp + 0x10], esi
cmp ecx, 0xff
jl 0x100067c0
mov ecx, 0xff
test ecx, ecx
jg 0x100067c6
xor ecx, ecx
add ebx, edx
cmp ebx, 0xff
jl 0x100067d5
mov ebx, 0xff
test ebx, ebx
jg 0x100067db
xor ebx, ebx
shr ecx, 3
mov edx, dword [esp + 0x10]
shr edx, 6
and cl, 0x1c
and dl, 3
and bl, 0xe0
or dl, cl
inc edi
or dl, bl
mov byte [edi - 1], dl
jmp 0x10006851
mov bl, byte [esp + 0x10]
mov byte [edi], bl
mov byte [edi + 1], cl
mov byte [edi + 2], dl
add edi, dword [eax + 0x7b8]
jmp 0x10006851
mov ebx, dword [esp + 0x38]
mov esi, dword [esp + 0x14]
and ebx, 0x1c
mov esi, dword [ebx + esi]
mov bl, 4
cmp dword [esp + 0x10], esi
jg 0x10006824
xor bl, bl
cmp edx, esi
setg dl
or bl, dl
cmp ecx, esi
mov cl, 2
jg 0x10006833
xor cl, cl
or bl, cl
xor ecx, ecx
mov cl, bl
test ecx, ecx
je 0x10006840
or ecx, 8
test byte [esp + 0x3c], 1
je 0x1000684f
shl cl, 4
or byte [edi], cl
inc edi
jmp 0x10006851
mov byte [edi], cl
add dword [esp + 0x3c], 2
add dword [esp + 0x38], 8
inc dword [esp + 0x28]
cmp dword [esp + 0x38], 0x24
jl 0x100064b5
mov dword [esp + 0x28], 0
mov dword [esp + 0x3c], 1
mov dword [esp + 0x38], 4
mov ecx, dword [esp + 0x20]
mov ecx, dword [ecx]
and ecx, 0xffc0
shr ecx, 4
add ecx, 0x1002f360
add dword [esp + 0x20], 4
movsx esi, word [ecx]
movsx ebp, word [ecx + 2]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x30], esi
mov ecx, dword [ecx]
and ecx, 0xffc0
shr ecx, 4
add ecx, 0x10030360
add dword [esp + 0x1c], 4
movsx edx, word [ecx]
movsx esi, word [ecx + 2]
add ebp, edx
mov ecx, dword [esp + 0x18]
add dword [esp + 0x18], 4
mov edx, dword [ecx]
mov dword [esp + 0x2c], esi
xor edx, 0xffff8003
mov esi, dword [esp + 0x30]
and edx, 0xfffc
shr edx, 2
add esi, edx
lea ecx, [ebp + edx]
add edx, dword [esp + 0x2c]
mov dword [esp + 0x10], esi
test esi, 0xc000
je 0x10006919
and esi, 0x8000
cmp esi, 1
sbb esi, esi
and esi, 0xff
mov dword [esp + 0x10], esi
jmp 0x1000691e
sar dword [esp + 0x10], 6
test ch, 0xc0
je 0x10006936
and ecx, 0x8000
cmp ecx, 1
sbb ecx, ecx
and ecx, 0xff
jmp 0x10006939
sar ecx, 6
test dh, 0xc0
je 0x10006951
and edx, 0x8000
cmp edx, 1
sbb edx, edx
and edx, 0xff
jmp 0x10006954
sar edx, 6
mov esi, dword [eax + 0x7b8]
cmp esi, 1
je 0x100069ac
cmp esi, 4
je 0x10006a25
cmp esi, 0xa
je 0x10006a39
shr edx, 1
inc edi
and dl, 0x7c
inc edi
mov dword [esp + 0x34], ecx
and byte [esp + 0x34], 0x38
sar ecx, 6
mov ebx, dword [esp + 0x34]
shl bl, 2
or dl, cl
mov byte [esp + 0x34], bl
mov ebx, dword [esp + 0x10]
sar ebx, 3
or byte [esp + 0x34], bl
mov bl, byte [esp + 0x34]
mov byte [edi - 2], bl
mov byte [edi - 1], dl
jmp 0x10006a6f
mov ebx, dword [esp + 0x28]
mov esi, dword [esp + 0x14]
and ebx, 3
mov esi, dword [esi + ebx*8]
mov ebx, dword [esp + 0x10]
sar esi, 3
sub esi, 0x10
add ebx, esi
cmp ebx, 0xff
jl 0x100069d3
mov ebx, 0xff
test ebx, ebx
jg 0x100069d9
xor ebx, ebx
mov dword [esp + 0x10], ebx
lea ebx, [esi + ecx]
cmp ebx, 0xff
jl 0x100069ed
mov ebx, 0xff
test ebx, ebx
jg 0x100069f3
xor ebx, ebx
add edx, esi
cmp edx, 0xff
jl 0x10006a02
mov edx, 0xff
test edx, edx
jg 0x10006a08
xor edx, edx
shr ebx, 3
mov ecx, dword [esp + 0x10]
shr ecx, 6
and bl, 0x1c
and cl, 3
and dl, 0xe0
or cl, bl
inc edi
or cl, dl
mov byte [edi - 1], cl
jmp 0x10006a6f
mov bl, byte [esp + 0x10]
mov byte [edi], bl
mov byte [edi + 1], cl
mov byte [edi + 2], dl
add edi, dword [eax + 0x7b8]
jmp 0x10006a6f
mov ebx, dword [esp + 0x28]
mov esi, dword [esp + 0x14]
and ebx, 3
mov esi, dword [esi + ebx*8]
mov bl, 4
cmp dword [esp + 0x10], esi
jg 0x10006a51
xor bl, bl
cmp edx, esi
setg dl
or bl, dl
cmp ecx, esi
mov cl, 2
jg 0x10006a60
xor cl, cl
or bl, cl
xor ecx, ecx
mov cl, bl
test ecx, ecx
je 0x10006a6d
or ecx, 8
mov byte [edi], cl
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 0x30]
add dword [esp + 0x18], 4
mov edx, dword [ecx]
xor edx, 0xffff8003
and edx, 0xfffc
shr edx, 2
add esi, edx
lea ecx, [ebp + edx]
add edx, dword [esp + 0x2c]
mov dword [esp + 0x10], esi
test esi, 0xc000
je 0x10006aba
and esi, 0x8000
cmp esi, 1
sbb esi, esi
and esi, 0xff
mov dword [esp + 0x10], esi
jmp 0x10006abf
sar dword [esp + 0x10], 6
test ch, 0xc0
je 0x10006ad7
and ecx, 0x8000
cmp ecx, 1
sbb ecx, ecx
and ecx, 0xff
jmp 0x10006ada
sar ecx, 6
test dh, 0xc0
je 0x10006af2
and edx, 0x8000
cmp edx, 1
sbb edx, edx
and edx, 0xff
jmp 0x10006af5
sar edx, 6
mov esi, dword [eax + 0x7b8]
cmp esi, 1
je 0x10006b4d
cmp esi, 4
je 0x10006bbd
cmp esi, 0xa
je 0x10006bd1
shr edx, 1
inc edi
and dl, 0x7c
inc edi
mov dword [esp + 0x34], ecx
and byte [esp + 0x34], 0x38
sar ecx, 6
mov ebx, dword [esp + 0x34]
shl bl, 2
or dl, cl
mov byte [esp + 0x34], bl
mov ebx, dword [esp + 0x10]
sar ebx, 3
or byte [esp + 0x34], bl
mov bl, byte [esp + 0x34]
mov byte [edi - 2], bl
mov byte [edi - 1], dl
jmp 0x10006c16
mov ebx, dword [esp + 0x38]
mov esi, dword [esp + 0x14]
and ebx, 0x1c
mov esi, dword [ebx + esi]
mov ebx, dword [esp + 0x10]
sar esi, 3
sub esi, 0x10
add ebx, esi
cmp ebx, 0xff
jl 0x10006b74
mov ebx, 0xff
test ebx, ebx
jg 0x10006b7a
xor ebx, ebx
add ecx, esi
cmp ecx, 0xff
jl 0x10006b89
mov ecx, 0xff
test ecx, ecx
jg 0x10006b8f
xor ecx, ecx
add edx, esi
cmp edx, 0xff
jl 0x10006b9e
mov edx, 0xff
test edx, edx
jg 0x10006ba4
xor edx, edx
shr ebx, 6
and dl, 0xe0
shr ecx, 3
and bl, 3
and cl, 0x1c
inc edi
or bl, cl
or bl, dl
mov byte [edi - 1], bl
jmp 0x10006c16
mov bl, byte [esp + 0x10]
mov byte [edi], bl
mov byte [edi + 1], cl
mov byte [edi + 2], dl
add edi, dword [eax + 0x7b8]
jmp 0x10006c16
mov ebx, dword [esp + 0x38]
mov esi, dword [esp + 0x14]
and ebx, 0x1c
mov esi, dword [ebx + esi]
mov bl, 4
cmp dword [esp + 0x10], esi
jg 0x10006be9
xor bl, bl
cmp edx, esi
setg dl
or bl, dl
cmp ecx, esi
mov cl, 2
jg 0x10006bf8
xor cl, cl
or bl, cl
xor ecx, ecx
mov cl, bl
test ecx, ecx
je 0x10006c05
or ecx, 8
test byte [esp + 0x3c], 1
je 0x10006c14
shl cl, 4
or byte [edi], cl
inc edi
jmp 0x10006c16
mov byte [edi], cl
add dword [esp + 0x3c], 2
add dword [esp + 0x38], 8
inc dword [esp + 0x28]
cmp dword [esp + 0x38], 0x24
jl 0x10006882
add dword [esp + 0x40], 4
add dword [esp + 0x14], 0x20
cmp dword [esp + 0x14], 0x1002d768
jb 0x10006497
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x34
ret