Function at 0x100057e0
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x20
mov eax, dword [0x1002b150]
push ebx
push esi
push edi
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
lea edi, [eax + 0x7e8]
lea ecx, [eax + 0x8e8]
lea edx, [eax + 0x9e8]
mov dword [esp + 0x14], edi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], edx
cmp dword [eax + 0x7b8], 3
jne 0x10005923
mov dword [esp + 0x2c], 8
mov eax, dword [esp + 0x34]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x24], 8
mov edx, dword [eax]
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
mov eax, dword [ecx]
and eax, 0xffc0
shr eax, 4
add dword [esp + 0x18], 4
movsx ebx, word [eax + 0x1002f362]
lea ecx, [eax + 0x1002f360]
mov dword [esp + 0x20], ebx
add dword [esp + 0x1c], 4
mov eax, dword [edi]
mov edi, dword [esp + 0x14]
and eax, 0xffc0
shr eax, 4
add dword [esp + 0x14], 4
lea esi, [eax + 0x10030360]
mov eax, dword [edi]
movsx ecx, word [ecx]
movsx ebp, word [esi]
xor eax, 0xffff8003
and eax, 0xfffc
shr eax, 2
movsx esi, word [esi + 2]
lea ebx, [ecx + eax]
mov ecx, dword [esp + 0x20]
add ecx, ebp
add ecx, eax
add eax, esi
test bh, 0xc0
je 0x100058c0
and ebx, 0x8000
cmp ebx, 1
sbb ebx, ebx
and ebx, 0xff
jmp 0x100058c3
sar ebx, 6
test ch, 0xc0
je 0x100058db
and ecx, 0x8000
cmp ecx, 1
sbb ecx, ecx
and ecx, 0xff
jmp 0x100058de
sar ecx, 6
test ah, 0xc0
je 0x100058f4
and eax, 0x8000
cmp eax, 1
sbb eax, eax
and eax, 0xff
jmp 0x100058f7
sar eax, 6
mov byte [edx], bl
add edx, 3
dec dword [esp + 0x24]
mov byte [edx - 2], cl
mov byte [edx - 1], al
jne 0x1000583c
add dword [esp + 0x28], 4
dec dword [esp + 0x2c]
jne 0x1000582e
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x20
ret
mov dword [esp + 0x28], 0x1002d668
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x24], 0
mov esi, dword [ecx]
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
add dword [esp + 0x1c], 4
mov ecx, dword [ecx]
mov edx, dword [edi]
and ecx, 0xffc0
and edx, 0xffc0
shr ecx, 4
mov edi, dword [esp + 0x14]
add dword [esp + 0x18], 4
shr edx, 4
lea ebx, [ecx + 0x1002f360]
add dword [esp + 0x14], 4
movsx ecx, word [ebx + 2]
add edx, 0x10030360
mov edi, dword [edi]
movsx ebx, word [ebx]
movsx ebp, word [edx]
movsx edx, word [edx + 2]
xor edi, 0xffff8003
add ecx, ebp
and edi, 0xfffc
shr edi, 2
add ebx, edi
add ecx, edi
add edx, edi
mov dword [esp + 0x10], ebx
test bh, 0xc0
je 0x100059c7
mov edi, ebx
and edi, 0x8000
cmp edi, 1
sbb edi, edi
and edi, 0xff
mov dword [esp + 0x10], edi
jmp 0x100059cc
sar dword [esp + 0x10], 6
test ch, 0xc0
je 0x100059e4
and ecx, 0x8000
cmp ecx, 1
sbb ecx, ecx
and ecx, 0xff
jmp 0x100059e7
sar ecx, 6
test dh, 0xc0
je 0x100059ff
and edx, 0x8000
cmp edx, 1
sbb edx, edx
and edx, 0xff
jmp 0x10005a02
sar edx, 6
mov edi, dword [eax + 0x7b8]
cmp edi, 1
je 0x10005a5a
cmp edi, 4
je 0x10005aca
cmp edi, 0xa
je 0x10005adb
shr edx, 1
inc esi
and dl, 0x7c
inc esi
mov dword [esp + 0x20], ecx
and byte [esp + 0x20], 0x38
sar ecx, 6
mov ebx, dword [esp + 0x20]
shl bl, 2
or dl, cl
mov byte [esp + 0x20], bl
mov ebx, dword [esp + 0x10]
sar ebx, 3
or byte [esp + 0x20], bl
mov bl, byte [esp + 0x20]
mov byte [esi - 2], bl
mov byte [esi - 1], dl
jmp 0x10005b20
mov edi, dword [esp + 0x24]
mov ebx, dword [esp + 0x28]
and edi, 7
mov edi, dword [ebx + edi*4]
mov ebx, dword [esp + 0x10]
sar edi, 3
sub edi, 0x10
add ebx, edi
cmp ebx, 0xff
jl 0x10005a81
mov ebx, 0xff
test ebx, ebx
jg 0x10005a87
xor ebx, ebx
add ecx, edi
cmp ecx, 0xff
jl 0x10005a96
mov ecx, 0xff
test ecx, ecx
jg 0x10005a9c
xor ecx, ecx
add edx, edi
cmp edx, 0xff
jl 0x10005aab
mov edx, 0xff
test edx, edx
jg 0x10005ab1
xor edx, edx
shr ebx, 6
and dl, 0xe0
shr ecx, 3
and bl, 3
and cl, 0x1c
inc esi
or bl, cl
or bl, dl
mov byte [esi - 1], bl
jmp 0x10005b20
mov bl, byte [esp + 0x10]
mov byte [esi], bl
mov byte [esi + 1], cl
mov byte [esi + 2], dl
add esi, 4
jmp 0x10005b20
mov edi, dword [esp + 0x24]
mov ebx, dword [esp + 0x28]
and edi, 7
mov edi, dword [ebx + edi*4]
mov bl, 4
cmp dword [esp + 0x10], edi
jg 0x10005af3
xor bl, bl
cmp ecx, edi
mov cl, 2
jg 0x10005afb
xor cl, cl
or bl, cl
cmp edx, edi
setg cl
or bl, cl
xor ecx, ecx
mov cl, bl
test ecx, ecx
je 0x10005b0f
or ecx, 8
test byte [esp + 0x24], 1
je 0x10005b1e
shl cl, 4
or byte [esi], cl
inc esi
jmp 0x10005b20
mov byte [esi], cl
inc dword [esp + 0x24]
cmp dword [esp + 0x24], 8
jl 0x10005941
add dword [esp + 0x2c], 4
add dword [esp + 0x28], 0x20
cmp dword [esp + 0x28], 0x1002d768
jb 0x10005933
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x20
ret