Function at 0x470340
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov eax, dword [0x7d8230]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
mov eax, dword [ebx + 4]
mov eax, dword [eax - 4]
mov dword [ebp - 4], eax
push eax
call fcn.004874e0
pop ecx
and eax, 0x100000
je 0x4703a8
mov eax, dword [ebp + 8]
xor edx, edx
push edx
push eax
call fcn.0046ab70
add esp, 8
push 0
push 2
push 0
push str.__OPARRAYINDEX
mov eax, dword [ebx + 4]
mov eax, dword [eax - 4]
push eax
mov eax, dword [ebp - 4]
push eax
call fcn.004689e0
add esp, 0x18
lea eax, [ebx + 0x10]
push eax
call fcn.004a4430
pop ecx
jmp 0x4706bc
mov eax, dword [ebp - 4]
mov eax, dword [eax]
and eax, 0x8000
je 0x4704d9
mov eax, dword [ebp + 8]
test eax, eax
je 0x47049e
mov edx, dword [ebp - 4]
mov edx, dword [edx + 8]
cmp eax, dword [edx + 4]
ja 0x47049e
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
cmp dword [eax + 8], 1
jbe 0x4703ff
mov eax, dword [ebp - 4]
mov edx, dword [ebp + 8]
shl edx, 5
mov ecx, dword [eax + 8]
mov ecx, dword [ecx]
lea edx, [ecx + edx - 0x20]
push edx
push eax
call fcn.004a4960
add esp, 8
jmp 0x4706bc
mov eax, dword [ebx + 4]
mov eax, dword [eax]
mov dword [ebp - 8], eax
mov eax, dword [ebx + 8]
dec eax
mov dword [ebp - 0x10], eax
mov edx, dword [ebx + 4]
mov ecx, dword [ebx]
sub edx, ecx
mov dword [ebp - 0xc], edx
mov eax, edx
cdq
and edx, 3
add eax, edx
sar eax, 2
mov ecx, dword [ebp - 0x10]
cmp ecx, eax
jg 0x47042f
call fcn.004a8c60
lea eax, [ebx + 4]
mov edx, dword [eax]
lea edx, [edx + 4]
mov dword [eax], edx
mov eax, dword [edx]
mov dword [eax], 0
mov eax, dword [ebp + 8]
shl eax, 5
mov edx, dword [ebp - 4]
mov edx, dword [edx + 8]
mov edx, dword [edx]
lea eax, [edx + eax - 0x20]
push eax
mov eax, dword [ebp - 8]
push eax
call fcn.004a44a0
add esp, 8
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 4]
push eax
call fcn.004a44a0
add esp, 8
lea eax, [ebx + 4]
mov edx, dword [eax]
lea edx, [edx - 4]
mov dword [eax], edx
mov eax, edx
mov edx, dword [ebx]
cmp eax, edx
jae 0x4706bc
push 0
push 0
push 0
push 0x233b
call fcn.00492ef0
add esp, 0x10
jmp 0x4706bc
mov eax, dword [ebp + 8]
xor edx, edx
push edx
push eax
call fcn.0046ab70
add esp, 8
push 0x2e
call fcn.004ab070
pop ecx
mov edx, dword [ebx + 4]
mov edx, dword [edx - 4]
push edx
mov edx, dword [ebp - 4]
push edx
push 2
push eax
push 0
push 0x46c
push 2
call fcn.00492870
add esp, 0x1c
jmp 0x4706bc
mov eax, dword [ebp - 4]
mov eax, dword [eax]
and eax, 0x400
je 0x470546
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
test eax, eax
je 0x4706bc
mov eax, dword [ebp + 8]
test eax, eax
je 0x4704fe
sub dword [ebp + 8], 1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
cmp dword [ebp + 8], eax
jae 0x470531
push 1
mov eax, dword [ebp - 4]
mov edx, dword [ebp + 8]
mov ecx, dword [eax + 0x10]
movsx edx, byte [ecx + edx]
movzx edx, dl
mov edx, dword [edx*4 + 0x7bfba8]
push edx
push eax
call fcn.004a4e80
add esp, 0xc
jmp 0x4706bc
push 0
push 0
mov eax, dword [ebp - 4]
push eax
call fcn.004a4ad0
add esp, 0xc
jmp 0x4706bc
mov eax, dword [ebp - 4]
mov eax, dword [eax]
and eax, 4
je 0x470686
mov eax, dword [ebp + 8]
xor edx, edx
push edx
push eax
call fcn.0046ab70
add esp, 8
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
mov eax, dword [eax + 0x28]
test eax, eax
jne 0x470579
mov dword [ebp - 8], 0
jmp 0x470580
mov dword [ebp - 8], 1
cmp dword [ebp - 8], 0
je 0x4705ee
mov eax, dword [ebp + 8]
test eax, eax
je 0x4705ad
mov edx, dword [ebp - 4]
mov edx, dword [edx + 8]
cmp eax, dword [edx + 0x20]
ja 0x4705ad
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 8]
mov edx, dword [edx + 0x28]
mov eax, dword [edx + eax*4 - 4]
mov dword [ebp - 0xc], eax
jmp 0x4705b4
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 0xc]
mov dword [ebp + 8], eax
test eax, eax
jne 0x470635
push 0x2e
call fcn.004ab070
pop ecx
mov edx, dword [ebx + 4]
mov edx, dword [edx - 4]
push edx
mov edx, dword [ebp - 4]
push edx
push 2
push eax
push 0
push 0x46c
push 2
call fcn.00492870
add esp, 0x1c
jmp 0x4706bc
lea eax, [ebp + 8]
push eax
mov eax, dword [ebx + 4]
mov eax, dword [eax - 4]
push eax
mov eax, dword [ebp - 4]
push eax
call fcn.00493f40
add esp, 0xc
test eax, eax
jne 0x470635
push 0x2e
call fcn.004ab070
pop ecx
mov edx, dword [ebx + 4]
mov edx, dword [edx - 4]
push edx
mov edx, dword [ebp - 4]
push edx
push 2
push eax
push 0
push 0x46c
push 2
call fcn.00492870
add esp, 0x1c
jmp 0x4706bc
mov eax, dword [ebx + 4]
mov eax, dword [eax - 4]
push eax
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp - 4]
push eax
call fcn.00494430
add esp, 0xc
mov eax, dword [ebx + 4]
mov eax, dword [eax - 4]
push eax
mov eax, dword [ebp - 4]
push eax
call fcn.004a44a0
add esp, 8
lea eax, [ebx + 4]
mov edx, dword [eax]
lea edx, [edx - 4]
mov dword [eax], edx
mov eax, edx
mov edx, dword [ebx]
cmp eax, edx
jae 0x4706bc
push 0
push 0
push 0
push 0x233b
call fcn.00492ef0
add esp, 0x10
jmp 0x4706bc
mov eax, dword [ebp + 8]
xor edx, edx
push edx
push eax
call fcn.0046ab70
add esp, 8
push 0x2e
call fcn.004ab070
pop ecx
mov edx, dword [ebx + 4]
mov edx, dword [edx - 4]
push edx
mov edx, dword [ebp - 4]
push edx
push 2
push eax
push 0
push 0x42c
push 1
call fcn.00492870
add esp, 0x1c
pop ebx
mov esp, ebp
pop ebp
ret