Function at 0x559690
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x24
mov eax, dword [0x678680]
push ebx
push ebp
push esi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
xor ebx, ebx
cmp edi, ebx
mov dword [esp + 0x24], edi
jne 0x5596bc
pop edi
pop esi
pop ebp
mov eax, 5
pop ebx
add esp, 0x24
ret
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x48]
xor eax, eax
xor ebp, ebp
mov ax, word [ecx*2 + 0x62485c]
mov ecx, dword [esp + 0x4c]
mov dword [esp + 0x28], eax
xor eax, eax
mov ax, word [edx*2 + 0x62485c]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x30], eax
xor eax, eax
mov ax, word [ecx*2 + 0x62485c]
mov dword [esp + 0x20], 1
mov dword [esp + 0x2c], eax
mov eax, dword [edi + 0xab6]
cmp eax, ebx
mov dword [esp + 0x1c], eax
jle 0x559bf8
cmp dword [edi], 0
jne 0x559bf8
cmp ebp, 1
jae 0x559743
lea esi, [edi + 0x9088]
push edi
push esi
call fcn.00556f00
xor edx, edx
mov ecx, ebp
mov dx, word [esi]
add ebp, 8
shl edx, cl
add esp, 8
or ebx, edx
cmp ebp, 1
jb 0x559726
test bl, 1
je 0x559878
mov ecx, dword [esp + 0x1c]
mov eax, dword [edi + 0x44]
shr ebx, 1
dec ebp
dec ecx
test eax, eax
mov dword [esp + 0x1c], ecx
je 0x559778
mov eax, dword [edi + 0x48]
test eax, eax
je 0x559778
mov eax, dword [edi + 0x8cea]
test eax, eax
ja 0x559778
mov dword [esp + 0x1c], 0
cmp ebp, dword [esp + 0x44]
jae 0x5597a4
lea esi, [edi + 0x9088]
push edi
push esi
call fcn.00556f00
xor eax, eax
mov ecx, ebp
mov ax, word [esi]
add ebp, 8
shl eax, cl
add esp, 8
or ebx, eax
mov eax, dword [esp + 0x44]
cmp ebp, eax
jb 0x559784
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x38]
mov eax, ebx
not eax
and eax, ecx
lea ecx, [eax + eax*2]
xor eax, eax
mov al, byte [edx + ecx*2]
lea edx, [edx + ecx*2]
mov esi, eax
cmp esi, 0x10
mov dword [esp + 0x18], edx
jbe 0x559838
cmp esi, 0x63
je 0x559c17
xor ecx, ecx
sub esi, 0x10
mov cl, byte [edx + 1]
sub ebp, ecx
shr ebx, cl
cmp ebp, esi
jae 0x55980d
lea eax, [edi + 0x9088]
push edi
push eax
call fcn.00556f00
xor ecx, ecx
add esp, 8
mov cx, word [edi + 0x9088]
mov edx, ecx
mov ecx, ebp
shl edx, cl
add ebp, 8
or ebx, edx
cmp ebp, esi
jb 0x5597e1
mov edx, dword [esp + 0x18]
xor eax, eax
mov ecx, ebx
mov ax, word [esi*2 + 0x62485c]
not ecx
and eax, ecx
mov ecx, dword [edx + 2]
xor edx, edx
lea eax, [eax + eax*2]
mov dl, byte [ecx + eax*2]
lea eax, [ecx + eax*2]
mov esi, edx
mov dword [esp + 0x18], eax
cmp esi, 0x10
mov edx, eax
ja 0x5597c8
mov eax, dword [esp + 0x14]
xor ecx, ecx
mov cl, byte [edx + 1]
shr ebx, cl
sub ebp, ecx
mov cl, byte [edx + 2]
mov byte [eax + edi + 0xcd6], cl
inc eax
cmp eax, 0x8000
mov dword [esp + 0x14], eax
jne 0x559bec
push edi
push eax
call fcn.005582b0
add esp, 8
xor eax, eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x14], eax
jmp 0x559bec
shr ebx, 1
dec ebp
cmp ebp, 6
jae 0x5598a3
lea esi, [edi + 0x9088]
push edi
push esi
call fcn.00556f00
xor edx, edx
mov ecx, ebp
mov dx, word [esi]
add ebp, 8
shl edx, cl
add esp, 8
or ebx, edx
cmp ebp, 6
jb 0x559886
mov eax, ebx
sub ebp, 6
and eax, 0x3f
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x4c]
shr ebx, 6
cmp ebp, eax
jae 0x5598e0
lea esi, [edi + 0x9088]
push edi
push esi
call fcn.00556f00
xor eax, eax
mov ecx, ebp
mov ax, word [esi]
add ebp, 8
shl eax, cl
add esp, 8
or ebx, eax
mov eax, dword [esp + 0x4c]
cmp ebp, eax
jb 0x5598c0
mov edx, dword [esp + 0x2c]
mov ecx, ebx
not ecx
and ecx, edx
mov edx, dword [esp + 0x40]
xor eax, eax
lea ecx, [ecx + ecx*2]
mov al, byte [edx + ecx*2]
lea edx, [edx + ecx*2]
mov esi, eax
mov dword [esp + 0x18], edx
cmp esi, 0x10
jbe 0x559974
cmp esi, 0x63
je 0x559c17
xor ecx, ecx
sub esi, 0x10
mov cl, byte [edx + 1]
sub ebp, ecx
shr ebx, cl
cmp ebp, esi
jae 0x559949
lea eax, [edi + 0x9088]
push edi
push eax
call fcn.00556f00
xor ecx, ecx
add esp, 8
mov cx, word [edi + 0x9088]
mov edx, ecx
mov ecx, ebp
shl edx, cl
add ebp, 8
or ebx, edx
cmp ebp, esi
jb 0x55991d
mov edx, dword [esp + 0x18]
xor eax, eax
mov ecx, ebx
mov ax, word [esi*2 + 0x62485c]
not ecx
and eax, ecx
mov ecx, dword [edx + 2]
xor edx, edx
lea eax, [eax + eax*2]
mov dl, byte [ecx + eax*2]
lea eax, [ecx + eax*2]
mov esi, edx
mov dword [esp + 0x18], eax
cmp esi, 0x10
mov edx, eax
ja 0x559904
xor ecx, ecx
xor eax, eax
mov cl, byte [edx + 1]
mov ax, word [edx + 2]
mov edx, dword [esp + 0x10]
sub ebp, ecx
shr ebx, cl
mov ecx, eax
mov eax, dword [esp + 0x14]
sub eax, ecx
mov ecx, dword [esp + 0x48]
sub eax, edx
cmp ebp, ecx
mov dword [esp + 0x10], eax
jae 0x5599c7
lea esi, [edi + 0x9088]
push edi
push esi
call fcn.00556f00
xor edx, edx
mov eax, dword [esp + 0x50]
mov dx, word [esi]
mov ecx, ebp
shl edx, cl
add ebp, 8
add esp, 8
or ebx, edx
cmp ebp, eax
jb 0x5599a3
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x30]
mov ecx, ebx
not ecx
and ecx, edx
mov edx, dword [esp + 0x3c]
lea ecx, [ecx + ecx*2]
lea edx, [edx + ecx*2]
xor ecx, ecx
mov dword [esp + 0x18], edx
mov cl, byte [edx]
mov esi, ecx
cmp esi, 0x10
jbe 0x559a5d
cmp esi, 0x63
je 0x559c17
xor ecx, ecx
sub esi, 0x10
mov cl, byte [edx + 1]
sub ebp, ecx
shr ebx, cl
cmp ebp, esi
jae 0x559a2d
lea eax, [edi + 0x9088]
push edi
push eax
call fcn.00556f00
xor edx, edx
mov ecx, ebp
mov dx, word [edi + 0x9088]
add ebp, 8
shl edx, cl
add esp, 8
or ebx, edx
cmp ebp, esi
jb 0x559a03
mov edx, dword [esp + 0x18]
xor ecx, ecx
mov edx, dword [edx + 2]
mov cx, word [esi*2 + 0x62485c]
mov esi, ebx
not esi
and ecx, esi
mov eax, dword [esp + 0x10]
lea ecx, [ecx + ecx*2]
lea esi, [edx + ecx*2]
xor ecx, ecx
mov dword [esp + 0x18], esi
mov cl, byte [esi]
mov edx, dword [esp + 0x18]
mov esi, ecx
cmp esi, 0x10
ja 0x5599ea
xor ecx, ecx
mov cl, byte [edx + 1]
mov dword [esp + 0x18], ecx
sub ebp, ecx
shr ebx, cl
xor ecx, ecx
mov cx, word [edx + 2]
test esi, esi
mov dword [esp + 0x18], ecx
je 0x559abc
cmp ebp, 8
jae 0x559aa8
lea esi, [edi + 0x9088]
push edi
push esi
call fcn.00556f00
xor edx, edx
mov ecx, ebp
mov dx, word [esi]
add ebp, 8
shl edx, cl
add esp, 8
or ebx, edx
cmp ebp, 8
jb 0x559a83
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
mov edx, ebx
and edx, 0xff
add ecx, edx
shr ebx, 8
mov dword [esp + 0x18], ecx
sub ebp, 8
mov edx, dword [esp + 0x1c]
sub edx, ecx
mov ecx, dword [edi + 0x44]
test ecx, ecx
mov dword [esp + 0x1c], edx
je 0x559ae6
mov ecx, dword [edi + 0x48]
test ecx, ecx
je 0x559ae6
mov ecx, dword [edi + 0x8cea]
test ecx, ecx
ja 0x559ae6
mov dword [esp + 0x1c], 0
mov esi, dword [esp + 0x14]
and eax, 0x7fff
cmp eax, esi
mov dword [esp + 0x10], eax
mov ecx, eax
ja 0x559afb
mov ecx, esi
mov edx, 0x8000
sub edx, ecx
mov ecx, dword [esp + 0x18]
cmp edx, ecx
jbe 0x559b0c
mov edx, ecx
sub ecx, edx
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x20]
test ecx, ecx
je 0x559b53
cmp esi, eax
ja 0x559b53
mov ecx, edx
lea edi, [esi + edi + 0xcd6]
mov esi, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
mov edi, dword [esp + 0x24]
add ecx, edx
add eax, edx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], eax
mov esi, ecx
jmp 0x559bc0
mov ecx, dword [esp + 0x10]
mov eax, esi
sub eax, ecx
cmp eax, edx
jb 0x559ba1
mov eax, dword [esp + 0x10]
mov ecx, edx
lea esi, [edi + eax + 0xcd6]
mov eax, dword [esp + 0x14]
lea edi, [edi + eax + 0xcd6]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x10]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x14]
mov edi, dword [esp + 0x24]
add ecx, edx
add eax, edx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], eax
mov esi, ecx
jmp 0x559bc0
mov eax, dword [esp + 0x10]
mov cl, byte [edi + eax + 0xcd6]
mov byte [edi + esi + 0xcd6], cl
inc esi
inc eax
dec edx
jne 0x559ba5
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], esi
cmp esi, 0x8000
jne 0x559be0
push edi
push esi
call fcn.005582b0
add esp, 8
xor eax, eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
test ecx, ecx
jne 0x559ae6
mov eax, dword [esp + 0x1c]
test eax, eax
jg 0x559712
mov edx, dword [esp + 0x14]
push edi
push edx
call fcn.005582b0
mov eax, dword [edi + 0x44]
add esp, 8
test eax, eax
je 0x559c24
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x24
ret
mov eax, dword [edi + 0xab2]
pop edi
neg eax
sbb eax, eax
pop esi
pop ebp
and eax, 5
pop ebx
add esp, 0x24
ret