Function at 0x10054330
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push ebx
push esi
push edi
push dword [0x100c7608]
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x34], ecx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
mov dword [ebp - 0x14], edi
test edi, edi
jne 0x10054360
mov eax, 5
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
xor esi, esi
mov edx, dword [edi + 0x7134]
xor ebx, ebx
mov ecx, dword [edi + 0x7130]
mov dword [ebp - 4], 0
movzx eax, word [eax*2 + 0x100b0540]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x18], 1
mov dword [ebp - 8], ecx
mov dword [ebp - 0x10], edx
movzx eax, word [eax*2 + 0x100b0540]
mov dword [ebp - 0x28], eax
test edx, edx
jl 0x100547d7
jg 0x100543b2
test ecx, ecx
je 0x100547d7
cmp dword [edi + 4], 0
jne 0x100547d7
cmp esi, 1
jae 0x100543f1
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 0x100543c7
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x10]
mov eax, ebx
dec esi
shr eax, 1
test bl, 1
mov ebx, eax
je 0x10054490
add ecx, 0xffffffff
mov dword [ebp - 8], ecx
adc edx, 0xffffffff
cmp dword [edi + 0x34], 0
mov dword [ebp - 0x10], edx
je 0x1005442a
cmp dword [edi + 0x3c], 0
je 0x1005442a
cmp dword [edi + 0x18370], 0
ja 0x1005442a
xor eax, eax
mov dword [ebp - 8], eax
mov dword [ebp - 0x10], eax
cmp esi, 8
jae 0x10054459
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, 8
jb 0x10054435
mov eax, dword [ebp - 4]
mov byte [eax + edi + 0x8344], bl
inc eax
mov dword [ebp - 4], eax
cmp eax, 0x8000
jne 0x10054485
mov edx, edi
mov ecx, eax
call fcn.10055240
mov dword [ebp - 0x18], 0
mov dword [ebp - 4], 0
shr ebx, 8
sub esi, 8
jmp 0x100547b6
cmp esi, 6
jae 0x100544c4
lea eax, [edi + 0x1b430]
jmp 0x100544a0
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 0x100544a0
mov eax, ebx
sub esi, 6
and eax, 0x3f
shr ebx, 6
mov dword [ebp - 0x20], eax
cmp esi, dword [ebp + 0xc]
jae 0x10054504
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 + 0xc]
jb 0x100544e0
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 0x10054587
lea esp, [esp]
cmp eax, 0x63
je 0x100547cb
movzx ecx, byte [edx + 1]
sub eax, 0x10
sub esi, ecx
shr ebx, cl
mov dword [ebp - 0x24], eax
cmp esi, eax
jae 0x10054568
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 0x10054541
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 0x10054520
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 + 8]
jae 0x100545d4
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 + 8]
jb 0x100545b0
mov ecx, dword [ebp - 0x34]
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 0x10054657
lea esp, [esp]
cmp eax, 0x63
je 0x100547cb
movzx ecx, byte [edx + 1]
sub eax, 0x10
sub esi, ecx
shr ebx, cl
mov dword [ebp - 0x24], eax
cmp esi, eax
jae 0x10054638
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 0x10054611
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 0x100545f0
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 0x100546b8
cmp esi, 8
jae 0x100546a7
lea eax, [edi + 0x1b430]
jmp 0x10054680
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 0x10054680
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
mov eax, dword [ebp - 0x10]
sbb eax, 0
cmp dword [edi + 0x34], 0
mov dword [ebp - 0x10], eax
je 0x100546e1
cmp dword [edi + 0x3c], 0
je 0x100546e1
cmp dword [edi + 0x18370], 0
ja 0x100546e1
xor eax, eax
mov dword [ebp - 8], eax
mov dword [ebp - 0x10], eax
mov esi, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
and edx, 0x7fff
mov dword [ebp - 0xc], edx
mov eax, edx
cmp edx, esi
ja 0x100546f8
mov eax, esi
mov edi, 0x8000
sub edi, eax
cmp edi, ecx
jbe 0x10054705
mov edi, ecx
sub ecx, edi
cmp dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], ecx
je 0x10054731
cmp esi, edx
ja 0x10054731
mov eax, dword [ebp - 0x14]
push edi
add eax, 0x8344
add eax, esi
push 0
push eax
call fcn.1007cff0
add esp, 0xc
add esi, edi
add dword [ebp - 0xc], edi
jmp 0x10054785
mov ecx, dword [ebp - 0x14]
mov eax, esi
sub eax, edx
cmp eax, edi
lea eax, [ecx + 0x8344]
jb 0x1005475e
add eax, edx
push edi
push eax
lea eax, [ecx + 0x8344]
add eax, esi
push eax
call fcn.1007d410
add esp, 0xc
add esi, edi
add dword [ebp - 0xc], edi
jmp 0x10054785
add eax, esi
lea ebx, [ecx + 0x8344]
mov dword [ebp - 0xc], eax
add ebx, edx
mov ecx, eax
lea ecx, [ecx]
mov al, byte [ebx]
lea ecx, [ecx + 1]
inc esi
mov byte [ecx - 1], al
inc edx
lea ebx, [ebx + 1]
sub edi, 1
jne 0x10054770
mov dword [ebp - 0xc], edx
mov edi, dword [ebp - 0x14]
cmp esi, 0x8000
jne 0x100547a2
mov edx, edi
mov ecx, esi
call fcn.10055240
mov dword [ebp - 0x18], 0
xor esi, esi
mov ecx, dword [ebp - 0x1c]
test ecx, ecx
jne 0x100546e4
mov ebx, dword [ebp - 0x24]
mov dword [ebp - 4], esi
mov esi, dword [ebp - 0x20]
mov edx, dword [ebp - 0x10]
test edx, edx
jl 0x100547d7
mov ecx, dword [ebp - 8]
jle 0x100543aa
jmp 0x100543b2
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 0x100547f9
mov eax, dword [edi + 0x7128]
or eax, dword [edi + 0x712c]
jne 0x10054354
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret