Function at 0x100556b0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x51c
push ebx
push esi
push edi
push dword [0x100c7608]
mov dword [ebp - 0xc], 0
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
mov dword [ebp - 0x20], edi
test edi, edi
je 0x10055bbe
mov esi, dword [edi + 0x1b42c]
lea eax, [edi + 0x1b430]
mov ebx, dword [edi + 0x1b428]
mov dword [ebp - 8], eax
cmp esi, 5
jae 0x10055722
mov edx, edi
mov ecx, eax
call fcn.1004f8d0
movzx eax, word [edi + 0x1b430]
mov ecx, esi
shl eax, cl
add esi, 8
or ebx, eax
lea eax, [edi + 0x1b430]
cmp esi, 5
jb 0x100556f6
lea eax, [edi + 0x1b430]
jmp 0x10055725
mov dword [ebp - 8], eax
mov ecx, ebx
sub esi, 5
and ecx, 0x1f
shr ebx, 5
add ecx, 0x101
mov dword [ebp - 0x18], ecx
cmp esi, 5
jae 0x10055760
mov edi, edi
mov edx, edi
mov ecx, eax
call fcn.1004f8d0
mov ecx, dword [ebp - 8]
movzx eax, word [ecx]
mov ecx, esi
shl eax, cl
add esi, 8
or ebx, eax
mov eax, dword [ebp - 8]
cmp esi, 5
jb 0x10055740
mov ecx, ebx
sub esi, 5
and ecx, 0x1f
shr ebx, 5
inc ecx
mov dword [ebp - 0x1c], ecx
cmp esi, 4
jae 0x100557a7
lea eax, [edi + 0x1b430]
lea ebx, [ebx]
mov edx, edi
mov ecx, eax
call fcn.1004f8d0
movzx eax, word [edi + 0x1b430]
mov ecx, esi
shl eax, cl
add esi, 8
or ebx, eax
lea eax, [edi + 0x1b430]
cmp esi, 4
jb 0x10055780
mov ecx, dword [ebp - 0x1c]
mov eax, ebx
sub esi, 4
and eax, 0xf
shr ebx, 4
add eax, 4
cmp dword [ebp - 0x18], 0x11e
mov dword [ebp - 8], eax
ja 0x10055bbe
cmp ecx, 0x1e
ja 0x10055bbe
xor edx, edx
mov dword [ebp - 0x10], edx
test eax, eax
je 0x10055830
cmp esi, 3
jae 0x10055809
lea eax, [edi + 0x1b430]
mov edx, edi
mov ecx, eax
call fcn.1004f8d0
movzx eax, word [edi + 0x1b430]
mov ecx, esi
shl eax, cl
add esi, 8
or ebx, eax
lea eax, [edi + 0x1b430]
cmp esi, 3
jb 0x100557e2
mov edx, dword [ebp - 0x10]
mov eax, dword [edx*4 + 0x100b04f0]
mov ecx, ebx
inc edx
shr ebx, 3
and ecx, 7
mov dword [ebp - 0x10], edx
sub esi, 3
mov dword [ebp + eax*4 - 0x518], ecx
cmp edx, dword [ebp - 8]
jb 0x100557d7
cmp edx, 0x13
jae 0x10055848
mov eax, dword [edx*4 + 0x100b04f0]
inc edx
mov dword [ebp + eax*4 - 0x518], 0
cmp edx, 0x13
jb 0x10055830
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 7
push eax
lea eax, [ebp - 0xc]
mov edx, 0x13
push eax
push 0
push 0
push 0x13
lea ecx, [ebp - 0x518]
call fcn.10054df0
add esp, 0x14
mov dword [ebp - 0x10], eax
test eax, eax
je 0x100558a1
mov ecx, dword [ebp - 0xc]
test ecx, ecx
je 0x10055bc3
mov esi, dword [ecx - 4]
sub ecx, 8
push ecx
call fcn.10086818
add esp, 4
mov ecx, esi
test esi, esi
jne 0x10055882
mov eax, dword [ebp - 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x14]
movzx eax, word [ecx*2 + 0x100b0540]
mov dword [ebp - 0x28], eax
xor eax, eax
xor edx, edx
mov dword [ebp - 8], eax
mov dword [ebp - 4], edx
lea esp, [esp]
cmp esi, ecx
jae 0x100558f7
lea eax, [edi + 0x1b430]
lea ebx, [ebx]
mov edx, edi
mov ecx, eax
call fcn.1004f8d0
movzx eax, word [edi + 0x1b430]
mov ecx, esi
shl eax, cl
add esi, 8
or ebx, eax
lea eax, [edi + 0x1b430]
cmp esi, dword [ebp - 0x14]
jb 0x100558d0
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0xc]
and eax, ebx
lea eax, [ecx + eax*8]
movzx ecx, byte [eax + 1]
mov dword [ebp - 0x10], eax
sub esi, ecx
movzx eax, word [eax + 4]
shr ebx, cl
cmp eax, 0x10
jae 0x10055923
mov dword [ebp + edx*4 - 0x518], eax
inc edx
jmp 0x10055a38
jne 0x1005598e
cmp esi, 2
jae 0x10055954
lea eax, [edi + 0x1b430]
mov edx, edi
mov ecx, eax
call fcn.1004f8d0
movzx eax, word [edi + 0x1b430]
mov ecx, esi
shl eax, cl
add esi, 8
or ebx, eax
lea eax, [edi + 0x1b430]
cmp esi, 2
jb 0x10055930
mov edx, dword [ebp - 4]
mov ecx, ebx
mov edi, dword [ebp - 0x1c]
and ecx, 3
add edi, dword [ebp - 0x18]
add ecx, 3
mov eax, dword [ebp - 4]
add edx, ecx
shr ebx, 2
sub esi, 2
mov dword [ebp - 0x24], ecx
cmp edx, edi
ja 0x10055bbe
lea edi, [ebp - 0x518]
lea edi, [edi + eax*4]
mov eax, dword [ebp - 8]
rep stosd dword es:[edi], eax
jmp 0x10055a3b
cmp eax, 0x11
jne 0x100559d4
cmp esi, 3
jae 0x100559c4
lea eax, [edi + 0x1b430]
mov edi, edi
mov edx, edi
mov ecx, eax
call fcn.1004f8d0
movzx eax, word [edi + 0x1b430]
mov ecx, esi
shl eax, cl
add esi, 8
or ebx, eax
lea eax, [edi + 0x1b430]
cmp esi, 3
jb 0x100559a0
mov ecx, ebx
shr ebx, 3
and ecx, 7
add ecx, 3
sub esi, 3
jmp 0x10055a12
cmp esi, 7
jae 0x10055a04
lea eax, [edi + 0x1b430]
nop
mov edx, edi
mov ecx, eax
call fcn.1004f8d0
movzx eax, word [edi + 0x1b430]
mov ecx, esi
shl eax, cl
add esi, 8
or ebx, eax
lea eax, [edi + 0x1b430]
cmp esi, 7
jb 0x100559e0
mov ecx, ebx
shr ebx, 7
and ecx, 0x7f
add ecx, 0xb
sub esi, 7
mov edx, dword [ebp - 4]
mov edi, dword [ebp - 0x1c]
add edx, ecx
add edi, dword [ebp - 0x18]
mov eax, dword [ebp - 4]
mov dword [ebp - 0x24], ecx
cmp edx, edi
ja 0x10055bbe
lea edi, [ebp - 0x518]
lea edi, [edi + eax*4]
xor eax, eax
rep stosd dword es:[edi], eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0x18]
mov edi, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 4], edx
cmp edx, eax
jb 0x100558c0
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x10055a75
lea esp, [esp]
mov edi, dword [eax - 4]
sub eax, 8
push eax
call fcn.10086818
add esp, 4
mov eax, edi
test edi, edi
jne 0x10055a60
mov eax, dword [ebp - 0x20]
lea ecx, [ebp - 0x518]
mov dword [ebp - 0x14], 9
mov dword [eax + 0x1b428], ebx
mov ebx, dword [ebp - 0x18]
mov edx, ebx
mov dword [eax + 0x1b42c], esi
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xc]
push eax
push 0x100c2db0
push 0x100c2df0
push 0x101
call fcn.10054df0
mov edi, eax
add esp, 0x14
test edi, edi
je 0x10055ae5
cmp edi, 1
jne 0x10055adc
mov ecx, dword [ebp - 0xc]
test ecx, ecx
je 0x10055adc
mov esi, dword [ecx - 4]
sub ecx, 8
push ecx
call fcn.10086818
add esp, 4
mov ecx, esi
test esi, esi
jne 0x10055ac7
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x1c]
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x10]
mov dword [ebp - 0x20], 6
push eax
push 0x100c2cb0
push 0x100c2d30
lea ecx, [ebp - 0x518]
push 0
lea ecx, [ecx + ebx*4]
call fcn.10054df0
mov edi, eax
add esp, 0x14
test edi, edi
je 0x10055b60
cmp edi, 1
jne 0x10055b3b
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x10055b3b
mov esi, dword [ecx - 4]
sub ecx, 8
push ecx
call fcn.10086818
add esp, 4
mov ecx, esi
test esi, esi
jne 0x10055b26
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x10055adc
mov esi, dword [eax - 4]
sub eax, 8
push eax
call fcn.10086818
add esp, 4
mov eax, esi
test esi, esi
jne 0x10055b42
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x20]
mov edi, dword [ebp - 0x10]
mov edx, edi
push dword [ebp - 0x14]
mov ebx, dword [ebp - 0xc]
mov ecx, ebx
call fcn.100552d0
add esp, 8
test eax, eax
jne 0x10055bbe
test ebx, ebx
je 0x10055b95
mov esi, dword [ebx - 4]
sub ebx, 8
push ebx
call fcn.10086818
add esp, 4
mov ebx, esi
test esi, esi
jne 0x10055b80
test edi, edi
je 0x10055bb5
lea esp, [esp]
mov esi, dword [edi - 4]
sub edi, 8
push edi
call fcn.10086818
add esp, 4
mov edi, esi
test esi, esi
jne 0x10055ba0
xor eax, eax
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