Function at 0x481340
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
mov esi, dword [esp + 0x24]
mov ecx, dword [esi + 4]
push edi
mov edi, dword [esp + 0x24]
mov eax, dword [edi + 4]
cmp eax, ecx
mov edx, eax
jl 0x48135d
mov edx, ecx
cmp edx, 0x20
jge 0x48144c
xor edx, edx
xor ebp, ebp
test ecx, ecx
mov dword [esp + 0x24], edx
mov dword [esp + 0x10], ebp
jle 0x481419
lea ebx, [ebx]
xor ecx, ecx
cmp dword [edi + 4], ecx
jle 0x4813c0
mov eax, dword [esi]
mov ebx, dword [eax + ebp*8]
lea esi, [eax + ebp*8]
mov eax, dword [edi]
mov edx, dword [eax]
cmp edx, ebx
jne 0x4813a3
mov ebp, dword [eax + 4]
cmp ebp, dword [esi + 4]
mov ebp, dword [esp + 0x10]
je 0x4813b8
cmp dword [eax + 4], ebx
jne 0x4813ad
cmp edx, dword [esi + 4]
je 0x4813b8
add ecx, 1
add eax, 8
cmp ecx, dword [edi + 4]
jl 0x481391
mov esi, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
mov eax, dword [edi + 4]
cmp ecx, eax
jne 0x4813e4
cmp edx, ebp
je 0x4813db
mov eax, dword [esi]
mov ecx, dword [eax + ebp*8]
mov dword [eax + edx*8], ecx
mov ecx, dword [eax + ebp*8 + 4]
mov dword [eax + edx*8 + 4], ecx
add edx, 1
mov dword [esp + 0x24], edx
jmp 0x481409
add eax, 0xffffffff
cmp ecx, eax
mov dword [edi + 4], eax
jge 0x481409
mov edi, edi
mov eax, dword [edi]
mov ebx, dword [eax + ecx*8 + 8]
lea eax, [eax + ecx*8]
mov dword [eax], ebx
mov ebx, dword [eax + 0xc]
add ecx, 1
mov dword [eax + 4], ebx
cmp ecx, dword [edi + 4]
jl 0x4813f0
add ebp, 1
cmp ebp, dword [esi + 4]
mov dword [esp + 0x10], ebp
jl 0x481380
mov eax, dword [esi + 8]
and eax, 0x3fffffff
cmp eax, edx
jge 0x481441
add eax, eax
cmp edx, eax
jl 0x48142d
mov eax, edx
push 8
push eax
push esi
call fcn.004026b0
mov edx, dword [esp + 0x30]
mov esi, dword [esp + 0x34]
add esp, 0xc
pop edi
mov dword [esi + 4], edx
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
push eax
call fcn.00408b50
mov ecx, dword [0x4c6060]
add esp, 4
push ecx
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edx, dword [eax + 0x20]
lea ecx, [ebx + 0x10]
and ecx, 0xfffffff0
lea esi, [edx + ecx]
cmp esi, dword [eax + 0x2c]
ja 0x48147e
mov dword [eax + 0x20], esi
mov dword [esp + 0x10], edx
jmp 0x48148c
mov edx, dword [eax]
push ecx
mov ecx, eax
mov eax, dword [edx + 0x14]
call eax
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x10]
push ebx
push ecx
lea ecx, [esp + 0x1c]
call fcn.00408b10
xor esi, esi
cmp dword [edi + 4], esi
jle 0x481504
mov eax, dword [edi]
mov ebx, dword [eax + esi*8]
mov ebp, dword [eax + esi*8 + 4]
cmp ebx, ebp
jbe 0x4814b5
mov eax, ebx
mov ebx, ebp
mov ebp, eax
push ebp
push ebx
lea ecx, [esp + 0x1c]
call fcn.00408e10
mov ecx, dword [esp + 0x1c]
cmp eax, ecx
jg 0x4814e6
mov edx, dword [esp + 0x14]
add ecx, eax
add dword [edx + ecx*8 + 8], 1
lea eax, [edx + ecx*8 + 8]
adc dword [eax + 4], 0
mov eax, dword [edi]
mov dword [eax + esi*8], 0
jmp 0x4814fc
mov eax, esi
shl eax, 8
or eax, 1
cdq
push edx
push eax
push ebp
push ebx
lea ecx, [esp + 0x24]
call fcn.00408d30
add esi, 1
cmp esi, dword [edi + 4]
jl 0x4814a2
mov ebp, dword [esp + 0x28]
xor esi, esi
xor ebx, ebx
cmp dword [ebp + 4], ebx
mov dword [esp + 0x24], esi
jle 0x4815be
lea esp, [esp]
mov ecx, dword [ebp]
mov eax, dword [ecx + ebx*8]
mov ecx, dword [ecx + ebx*8 + 4]
cmp eax, ecx
jbe 0x481534
mov edx, eax
mov eax, ecx
mov ecx, edx
push ecx
push eax
lea ecx, [esp + 0x1c]
call fcn.00408e10
mov ecx, dword [esp + 0x1c]
cmp eax, ecx
jg 0x48159a
mov edx, dword [esp + 0x14]
add ecx, eax
mov esi, dword [edx + ecx*8 + 8]
lea ecx, [edx + ecx*8 + 8]
mov edx, dword [ecx + 4]
mov ebp, esi
and ebp, 0xff
cmp ebp, 1
jle 0x48157a
mov ebp, dword [esp + 0x28]
add esi, 0xffffffff
adc edx, 0xffffffff
mov dword [ecx], esi
mov esi, dword [esp + 0x24]
mov dword [ecx + 4], edx
jmp 0x4815b2
push eax
lea ecx, [esp + 0x18]
call fcn.00408ea0
mov eax, dword [edi]
mov ebp, dword [esp + 0x28]
shr esi, 8
mov dword [eax + esi*8], 0
mov esi, dword [esp + 0x24]
jmp 0x4815b2
mov eax, dword [ebp]
mov ecx, dword [eax + ebx*8]
mov dword [eax + esi*8], ecx
mov edx, dword [eax + ebx*8 + 4]
mov dword [eax + esi*8 + 4], edx
add esi, 1
mov dword [esp + 0x24], esi
add ebx, 1
cmp ebx, dword [ebp + 4]
jl 0x481520
mov eax, dword [ebp + 8]
and eax, 0x3fffffff
cmp eax, esi
jge 0x4815de
add eax, eax
cmp esi, eax
jl 0x4815d2
mov eax, esi
push 8
push eax
push ebp
call fcn.004026b0
add esp, 0xc
mov dword [ebp + 4], esi
xor ecx, ecx
xor esi, esi
cmp dword [edi + 4], ecx
jle 0x481611
lea ebx, [ebx]
mov eax, dword [edi]
cmp dword [eax + ecx*8], 0
je 0x481609
mov edx, dword [eax + ecx*8]
mov dword [eax + esi*8], edx
mov edx, dword [eax + ecx*8 + 4]
mov dword [eax + esi*8 + 4], edx
add esi, 1
add ecx, 1
cmp ecx, dword [edi + 4]
jl 0x4815f0
mov eax, dword [edi + 8]
and eax, 0x3fffffff
cmp eax, esi
jge 0x481631
add eax, eax
cmp esi, eax
jl 0x481625
mov eax, esi
push 8
push eax
push edi
call fcn.004026b0
add esp, 0xc
lea ecx, [esp + 0x14]
mov dword [edi + 4], esi
call fcn.00409260
mov eax, dword [0x4c6060]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [esp + 0x10]
cmp ecx, dword [eax + 0x28]
mov dword [eax + 0x20], ecx
jne 0x48165f
mov edx, dword [eax]
push ecx
mov ecx, eax
mov eax, dword [edx + 0x18]
call eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret