Function at 0x473b40
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x160
mov eax, dword [ebx + 0xb828]
push esi
mov esi, dword [eax + 0x3c]
push edi
push 1
and esi, 0xfffff
push esi
lea ecx, [ebp - 0x1c]
push ecx
lea edx, [ebp - 0xe0]
push edx
lea ecx, [ebp - 4]
push ecx
lea edx, [ebp - 0x160]
push edx
push 0x433e88
xor edi, edi
push eax
mov ecx, ebx
mov dword [ebp - 4], edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], 1
mov dword [ebp - 0x14], 2
mov dword [ebp - 0x10], 3
call fcn.004f3a10
cmp eax, edi
je 0x473ca3
push 1
push esi
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0xe0]
push ecx
mov ecx, dword [ebx + 0xb828]
lea edx, [ebp - 4]
push edx
lea eax, [ebp - 0x160]
push eax
push 0x434018
push ecx
mov ecx, ebx
call fcn.004f3a10
cmp eax, edi
je 0x473ca3
push 1
push esi
lea edx, [ebp - 0x1c]
push edx
lea eax, [ebp - 0xe0]
push eax
mov eax, dword [ebx + 0xb828]
lea ecx, [ebp - 4]
push ecx
lea edx, [ebp - 0x160]
push edx
push 0x4341a8
push eax
mov ecx, ebx
call fcn.004f3a10
cmp eax, edi
je 0x473ca3
push 1
push esi
lea ecx, [ebp - 0x1c]
push ecx
lea edx, [ebp - 0xe0]
push edx
mov edx, dword [ebx + 0xb828]
lea eax, [ebp - 4]
push eax
lea ecx, [ebp - 0x160]
push ecx
push 0x434338
push edx
mov ecx, ebx
call fcn.004f3a10
cmp eax, edi
je 0x473ca3
push 1
push esi
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0xe0]
push ecx
mov ecx, dword [ebx + 0xb828]
lea edx, [ebp - 4]
push edx
lea eax, [ebp - 0x160]
push eax
push 0x4344c8
push ecx
mov ecx, ebx
call fcn.004f3a10
cmp eax, edi
je 0x473ca3
push 1
push esi
lea edx, [ebp - 0x1c]
push edx
lea eax, [ebp - 0xe0]
push eax
mov eax, dword [ebx + 0xb828]
lea ecx, [ebp - 4]
push ecx
lea edx, [ebp - 0x160]
push edx
push 0x434658
push eax
mov ecx, ebx
call fcn.004f3a10
cmp eax, edi
jne 0x473f75
lea edi, [esi*4]
push edi
lea ecx, [ebp - 0xb0]
push ecx
lea edx, [ebp - 0x1c]
push edx
call sub.msvcrt.dll_memcpy
add esp, 0xc
push edi
lea eax, [ebp - 0xe0]
push eax
lea ecx, [ebp - 0x3c]
push ecx
call sub.msvcrt.dll_memcpy
add esp, 0xc
push edi
lea edx, [ebp - 0xc0]
push edx
lea eax, [ebp - 0x2c]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
xor edx, edx
test esi, esi
jbe 0x473d33
mov cl, byte [ebx + 0xaf]
shr cl, 4
and cl, 1
mov byte [ebp - 9], cl
jmp 0x473d00
mov eax, dword [ebp + edx*4 - 0x1c]
test cl, cl
je 0x473d2e
test byte [eax + 0x48], 1
jne 0x473d2e
mov ecx, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov dword [ebp - 4], eax
mov eax, ecx
and eax, 4
xor edi, edi
or eax, edi
je 0x473d40
and ecx, 0x10
xor eax, eax
or ecx, eax
je 0x473d40
mov cl, byte [ebp - 9]
inc edx
cmp edx, esi
jb 0x473d00
mov eax, dword [0x551d48]
test eax, eax
jge 0x473d75
xor eax, eax
jmp 0x473d7c
mov eax, dword [ebx + 0xb828]
test eax, eax
je 0x473d55
mov eax, dword [eax + 0x38]
test eax, eax
je 0x473d55
mov ecx, eax
jmp 0x473d57
xor ecx, ecx
push 0x43e2f0
push ebx
mov eax, 0x125f
call fcn.004f47f0
add esp, 8
mov eax, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 0x14], 0
je 0x473da3
mov ecx, dword [eax + 0x14]
test ecx, ecx
jne 0x473d8d
mov edi, ecx
jmp 0x473db1
mov edx, dword [ecx]
mov dword [eax + 0x14], edx
test edx, edx
jne 0x473d99
mov dword [eax + 0x18], edx
mov dword [ecx], 0xfefefefe
mov edi, ecx
jmp 0x473db1
mov ecx, dword [eax + 0x10]
push 0x10
push 0x44
call fcn.00547721
mov edi, eax
xor eax, eax
cmp edi, eax
je 0x473ef9
push eax
mov dword [edi], eax
mov dword [edi + 8], eax
mov dword [edi + 0x3c], eax
mov dword [edi + 4], eax
mov dword [edi + 0xc], eax
mov dword [edi + 0x14], eax
mov dword [edi + 0x18], eax
mov dword [edi + 0x1c], eax
mov dword [edi + 0x24], eax
mov dword [edi + 0x34], eax
mov dword [edi + 0x38], eax
or ecx, 0xffffffff
xor edx, edx
mov eax, esi
and eax, 0xfffff
mov dword [edi + 0x10], ecx
mov word [edi + 0x40], dx
mov word [edi + 0x42], dx
mov dword [edi + 0x20], ecx
lea ecx, [esi + esi*2]
or eax, 0x70100000
push edi
mov edx, esi
call fcn.0050a980
mov dword [ebp - 4], eax
test eax, eax
jl 0x473ea5
mov eax, dword [ebx + 0xb828]
mov ecx, dword [eax + 0x34]
mov dword [edi + 0x34], ecx
mov edx, dword [eax + 0x38]
mov dword [edi + 0x38], edx
mov edx, dword [edi + 0xc]
lea eax, [esi*4]
push eax
mov eax, dword [ebx + 0xb828]
mov ecx, dword [eax + 0xc]
push ecx
push edx
call sub.msvcrt.dll_memcpy
mov ecx, dword [edi + 4]
add esp, 0xc
lea eax, [esi*4]
push eax
lea eax, [ebp - 0x1c]
push eax
push ecx
call sub.msvcrt.dll_memcpy
mov ecx, dword [edi + 4]
add esp, 0xc
lea eax, [esi*4]
push eax
lea edx, [ebp - 0x2c]
push edx
add ecx, eax
push ecx
call sub.msvcrt.dll_memcpy
add esp, 0xc
lea eax, [esi*4]
push eax
mov eax, dword [edi + 4]
lea edx, [ebp - 0x3c]
push edx
lea ecx, [eax + esi*8]
push ecx
call sub.msvcrt.dll_memcpy
mov edx, dword [ebx]
mov eax, dword [edx + 0x3c]
add esp, 0xc
push 0
push edi
mov ecx, ebx
call eax
test al, al
je 0x473f04
mov dword [ebp - 4], 1
mov esi, edi
call fcn.0050a890
mov eax, dword [0x551d48]
test eax, eax
jl 0x473f72
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
je 0x473f72
push 0x44
push 0xfe
push edi
call sub.msvcrt.dll_memset
mov dword [edi], 0
mov eax, dword [esi + 0x18]
add esp, 0xc
test eax, eax
je 0x473f6c
mov dword [eax], edi
mov eax, dword [ebp - 4]
mov dword [esi + 0x18], edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, 0x8007000e
pop edi
pop esi
mov esp, ebp
pop ebp
ret
or edx, 0xffffffff
mov ecx, edi
call fcn.004670b0
mov esi, dword [ebx + 0xb828]
mov ecx, dword [esi + 0x10]
mov eax, dword [ebx + 0x10]
cmp ecx, eax
jae 0x473f2b
mov edx, dword [ebx + 0x14]
cmp dword [edx + ecx*4], esi
jne 0x473f2b
mov dword [ebp - 4], ecx
jmp 0x473f4a
test eax, eax
jbe 0x473f41
mov ecx, dword [ebx + 0x14]
lea ecx, [ecx + eax*4]
sub ecx, 4
dec eax
cmp dword [ecx], esi
je 0x473f42
test eax, eax
ja 0x473f35
dec eax
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
je 0x473f64
call fcn.0050a890
call fcn.0050cb90
mov edx, dword [ebx + 0x14]
mov eax, dword [ebp - 4]
mov dword [edx + eax*4], edi
mov dword [edi + 0x10], eax
or dword [ebx + 0x18], 6
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x14], edi
mov dword [esi + 0x18], edi
mov eax, dword [ebp - 4]
pop edi
pop esi
mov esp, ebp
pop ebp
ret