Function at 0x100538e0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
push esi
push edi
push dword [0x100c7608]
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x2c], ecx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
mov dword [ebp - 0x14], edi
test edi, edi
jne 0x10053910
mov eax, 5
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
xor ecx, ecx
mov edx, dword [edi + 0x7130]
xor esi, esi
xor ebx, ebx
mov dword [ebp - 4], ecx
mov dword [ebp - 0x18], 1
movzx eax, word [eax*2 + 0x100b0540]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 8], edx
movzx eax, word [eax*2 + 0x100b0540]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + 0x14]
movzx eax, word [eax*2 + 0x100b0540]
mov dword [ebp - 0x30], eax
mov eax, dword [edi + 0x7134]
mov dword [ebp - 0x10], eax
test eax, eax
jl 0x10053e1d
jg 0x10053970
test edx, edx
je 0x10053e1d
mov edi, edi
cmp dword [edi + 4], 0
jne 0x10053e1a
cmp esi, 1
jae 0x100539ac
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, 1
jb 0x10053985
mov edx, dword [ebp - 8]
mov eax, ebx
dec esi
shr eax, 1
test bl, 1
mov ebx, eax
je 0x10053ad4
add edx, 0xffffffff
mov dword [ebp - 8], edx
adc dword [ebp - 0x10], 0xffffffff
cmp dword [edi + 0x34], 0
je 0x100539e3
cmp dword [edi + 0x3c], 0
je 0x100539e3
cmp dword [edi + 0x18370], 0
ja 0x100539e3
xor eax, eax
mov dword [ebp - 8], eax
mov dword [ebp - 0x10], eax
cmp esi, dword [ebp + 0xc]
jae 0x10053a14
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, dword [ebp + 0xc]
jb 0x100539f0
mov ecx, dword [ebp - 0x2c]
mov eax, ebx
not eax
and eax, dword [ebp - 0x28]
lea edx, [ecx + eax*8]
movzx eax, byte [edx]
mov dword [ebp - 0x1c], edx
cmp eax, 0x10
jbe 0x10053a97
lea esp, [esp]
cmp eax, 0x63
je 0x10053e0e
movzx ecx, byte [edx + 1]
sub eax, 0x10
sub esi, ecx
shr ebx, cl
mov dword [ebp - 0x24], eax
cmp esi, eax
jae 0x10053a78
lea ecx, [edi + 0x1b430]
mov edx, edi
call fcn.1004f8d0
movzx eax, word [edi + 0x1b430]
mov ecx, esi
shl eax, cl
add esi, 8
or ebx, eax
lea ecx, [edi + 0x1b430]
mov eax, dword [ebp - 0x24]
cmp esi, eax
jb 0x10053a51
mov edx, dword [ebp - 0x1c]
movzx ecx, word [eax*2 + 0x100b0540]
mov eax, ebx
not eax
and ecx, eax
mov eax, dword [edx + 4]
lea edx, [eax + ecx*8]
movzx eax, byte [edx]
mov dword [ebp - 0x1c], edx
cmp eax, 0x10
ja 0x10053a30
movzx ecx, byte [edx + 1]
mov al, byte [edx + 4]
sub esi, ecx
shr ebx, cl
mov ecx, dword [ebp - 4]
mov byte [ecx + edi + 0x8344], al
inc ecx
mov dword [ebp - 4], ecx
cmp ecx, 0x8000
jne 0x10053df9
mov edx, edi
call fcn.10055240
xor ecx, ecx
mov dword [ebp - 0x18], 0
mov dword [ebp - 4], ecx
jmp 0x10053df9
cmp esi, 6
jae 0x10053b04
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, 6
jb 0x10053ae0
mov eax, ebx
sub esi, 6
and eax, 0x3f
shr ebx, 6
mov dword [ebp - 0x20], eax
cmp esi, dword [ebp + 0x14]
jae 0x10053b44
lea eax, [edi + 0x1b430]
lea ecx, [ecx]
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 0x10053b20
mov ecx, dword [ebp + 8]
mov eax, ebx
not eax
and eax, dword [ebp - 0x30]
lea edx, [ecx + eax*8]
movzx eax, byte [edx]
mov dword [ebp - 0x1c], edx
cmp eax, 0x10
jbe 0x10053bc7
lea esp, [esp]
cmp eax, 0x63
je 0x10053e0e
movzx ecx, byte [edx + 1]
sub eax, 0x10
sub esi, ecx
shr ebx, cl
mov dword [ebp - 0x24], eax
cmp esi, eax
jae 0x10053ba8
lea ecx, [edi + 0x1b430]
mov edx, edi
call fcn.1004f8d0
movzx eax, word [edi + 0x1b430]
mov ecx, esi
shl eax, cl
add esi, 8
or ebx, eax
lea ecx, [edi + 0x1b430]
mov eax, dword [ebp - 0x24]
cmp esi, eax
jb 0x10053b81
mov edx, dword [ebp - 0x1c]
movzx ecx, word [eax*2 + 0x100b0540]
mov eax, ebx
not eax
and ecx, eax
mov eax, dword [edx + 4]
lea edx, [eax + ecx*8]
movzx eax, byte [edx]
mov dword [ebp - 0x1c], edx
cmp eax, 0x10
ja 0x10053b60
movzx ecx, byte [edx + 1]
movzx eax, word [edx + 4]
sub esi, ecx
shr ebx, cl
mov ecx, dword [ebp - 4]
sub ecx, eax
sub ecx, dword [ebp - 0x20]
mov dword [ebp - 0xc], ecx
cmp esi, dword [ebp + 0x10]
jae 0x10053c14
lea eax, [edi + 0x1b430]
lea esp, [esp]
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 + 0x10]
jb 0x10053bf0
mov ecx, dword [ebp - 0x38]
mov eax, ebx
not eax
and eax, dword [ebp - 0x34]
lea edx, [ecx + eax*8]
movzx eax, byte [edx]
mov dword [ebp - 0x1c], edx
cmp eax, 0x10
jbe 0x10053c97
lea esp, [esp]
cmp eax, 0x63
je 0x10053e0e
movzx ecx, byte [edx + 1]
sub eax, 0x10
sub esi, ecx
shr ebx, cl
mov dword [ebp - 0x24], eax
cmp esi, eax
jae 0x10053c78
lea ecx, [edi + 0x1b430]
mov edx, edi
call fcn.1004f8d0
movzx eax, word [edi + 0x1b430]
mov ecx, esi
shl eax, cl
add esi, 8
or ebx, eax
lea ecx, [edi + 0x1b430]
mov eax, dword [ebp - 0x24]
cmp esi, eax
jb 0x10053c51
mov edx, dword [ebp - 0x1c]
movzx ecx, word [eax*2 + 0x100b0540]
mov eax, ebx
not eax
and ecx, eax
mov eax, dword [edx + 4]
lea edx, [eax + ecx*8]
movzx eax, byte [edx]
mov dword [ebp - 0x1c], edx
cmp eax, 0x10
ja 0x10053c30
movzx ecx, byte [edx + 1]
shr ebx, cl
sub esi, ecx
movzx ecx, word [edx + 4]
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], ecx
test eax, eax
je 0x10053cf8
cmp esi, 8
jae 0x10053ce7
lea eax, [edi + 0x1b430]
jmp 0x10053cc0
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, 8
jb 0x10053cc0
mov ecx, dword [ebp - 0x1c]
movzx eax, bl
shr ebx, 8
add ecx, eax
sub esi, 8
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], esi
sub dword [ebp - 8], ecx
sbb dword [ebp - 0x10], 0
cmp dword [edi + 0x34], 0
je 0x10053d1c
cmp dword [edi + 0x3c], 0
je 0x10053d1c
cmp dword [edi + 0x18370], 0
ja 0x10053d1c
xor eax, eax
mov dword [ebp - 8], eax
mov dword [ebp - 0x10], eax
mov ebx, dword [ebp - 4]
nop
mov edx, dword [ebp - 0xc]
and edx, 0x7fff
mov dword [ebp - 0xc], edx
mov eax, edx
cmp edx, ebx
ja 0x10053d34
mov eax, ebx
mov edi, 0x8000
sub edi, eax
cmp edi, ecx
jbe 0x10053d41
mov edi, ecx
sub ecx, edi
cmp dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], ecx
je 0x10053d6d
cmp ebx, edx
ja 0x10053d6d
mov eax, dword [ebp - 0x14]
push edi
add eax, 0x8344
add eax, ebx
push 0
push eax
call fcn.1007cff0
add esp, 0xc
add ebx, edi
add dword [ebp - 0xc], edi
jmp 0x10053dc5
mov ecx, dword [ebp - 0x14]
mov eax, ebx
sub eax, edx
cmp eax, edi
lea eax, [ecx + 0x8344]
jb 0x10053d9a
add eax, edx
push edi
push eax
lea eax, [ecx + 0x8344]
add eax, ebx
push eax
call fcn.1007d410
add esp, 0xc
add ebx, edi
add dword [ebp - 0xc], edi
jmp 0x10053dc5
add eax, ebx
lea esi, [ecx + 0x8344]
mov dword [ebp - 0xc], eax
add esi, edx
mov ecx, eax
lea esp, [esp]
mov al, byte [esi]
lea ecx, [ecx + 1]
inc ebx
mov byte [ecx - 1], al
inc edx
lea esi, [esi + 1]
sub edi, 1
jne 0x10053db0
mov dword [ebp - 0xc], edx
mov edi, dword [ebp - 0x14]
cmp ebx, 0x8000
jne 0x10053de2
mov edx, edi
mov ecx, ebx
call fcn.10055240
mov dword [ebp - 0x18], 0
xor ebx, ebx
mov ecx, dword [ebp - 0x1c]
test ecx, ecx
jne 0x10053d20
mov esi, dword [ebp - 0x20]
mov dword [ebp - 4], ebx
mov ebx, dword [ebp - 0x24]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x10]
test eax, eax
jl 0x10053e1d
mov edx, dword [ebp - 8]
jle 0x10053966
jmp 0x10053970
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov edx, edi
call fcn.10055240
cmp dword [edi + 0x34], 0
jne 0x10053e3c
mov eax, dword [edi + 0x7128]
or eax, dword [edi + 0x712c]
jne 0x10053904
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret