Function at 0x46f648
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3f4
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov ebx, ecx
mov dword [esp + 0x24], edx
test edi, edi
je 0x46f696
mov edx, edi
lea ecx, [esp + 0x130]
call fcn.0045ea82
mov eax, dword [edi + 8]
lea edx, [ebx + 8]
mov esi, dword [edi]
lea ecx, [ebx + 4]
mov dword [esp + 0x18], eax
mov eax, dword [edi + 4]
push esi
mov dword [esp + 0x14], eax
call fcn.0045ebca
pop ecx
xor ebx, ebx
jmp 0x46f734
lea eax, [esp + 0x130]
push eax
call dword [sym.imp.KERNEL32.dll_RtlCaptureContext]
mov eax, dword [esp + 0x1e8]
lea ecx, [ebx + 4]
mov esi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x1e4]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x1f4]
mov dword [esp + 0x14], eax
mov eax, dword [0x719350]
not eax
mov dword [esp + 0x1c], ecx
push eax
call esi
mov dword [ebx + 4], eax
mov eax, dword [0x718f58]
not eax
push eax
call esi
mov esi, dword [esp + 0x14]
lea ecx, [ebx + 8]
mov edx, eax
mov dword [esp + 0x20], ecx
lea eax, [ebx + 4]
mov dword [ecx], edx
cmp esi, dword [eax]
ja 0x46f706
xor ebx, ebx
inc ebx
cmp esi, edx
jae 0x46f75f
mov edx, ecx
mov ecx, eax
push esi
call fcn.0045ebca
mov edx, dword [esp + 0x20]
pop ecx
mov ecx, 0x719350
mov edx, dword [edx]
call fcn.00467d06
mov edx, dword [esp + 0x20]
mov ecx, 0x718f58
mov edx, dword [edx]
call fcn.00467d06
xor ebx, ebx
inc ebx
test edi, edi
je 0x46f75f
cmp dword [edi + 0xc10], 0
je 0x46f75f
mov edi, dword [edi + 0xc10]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp edi, eax
je 0x46f75f
push edi
xor edi, edi
push edi
push 0x48
call dword [sym.imp.KERNEL32.dll_OpenThread]
jmp 0x46f767
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
xor edi, edi
push 0x108
mov dword [esp + 0x18], eax
lea eax, [esp + 0x2c]
push edi
push eax
call fcn.00544d60
mov eax, dword [esp + 0x24]
add esp, 0xc
mov dword [esp + 0x58], esi
mov esi, dword [esp + 0x24]
mov dword [esp + 0x28], eax
add esi, 8
mov eax, dword [esp + 0x10]
push 3
pop ecx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x34], ecx
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], edi
mov dword [esp + 0x54], ecx
mov dword [esp + 0x5c], edi
mov dword [esp + 0x64], ecx
mov dword [esp + 0x10], edi
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x130]
push eax
lea edx, [esp + 0x2c]
call fcn.0045e582
pop ecx
mov ecx, dword [esp + 0x28]
test edi, edi
jne 0x46f7e4
cmp ecx, dword [esp + 0x18]
jne 0x46f7e4
cmp dword [esp + 0x2c], 0
jne 0x46f7e4
inc ebx
test al, al
je 0x46f853
mov dword [esp + 0x18], ecx
call fcn.0045e5f0
test al, al
jne 0x46f853
cmp edi, ebx
jb 0x46f846
mov eax, dword [esp + 0x48]
mov dword [esi - 4], eax
mov eax, dword [esp + 0x58]
mov dword [esi], eax
mov eax, dword [esp + 0x80]
mov dword [esi - 8], ecx
mov byte [esi + 4], 1
mov dword [esi + 8], eax
mov eax, dword [esp + 0x88]
mov dword [esi + 0xc], eax
mov eax, dword [esp + 0x90]
mov dword [esi + 0x10], eax
mov eax, dword [esp + 0x98]
mov dword [esi + 0x14], eax
add esi, 0x20
mov eax, dword [esp + 0x10]
inc eax
mov dword [esp + 0x10], eax
cmp eax, dword [ebp + 8]
je 0x46f853
inc edi
cmp edi, 0x100
jb 0x46f7b8
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret