Function at 0x47af70
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x128
push ebx
push ebp
push esi
mov esi, dword [esp + 0x138]
mov ebp, ecx
push edi
mov dword [esp + 0x18], ebp
mov eax, dword [esi]
cmp eax, 0x10
je 0x47af93
cmp eax, 0x12
jne 0x47affb
call fcn.00477490
lea ecx, [esi + 4]
mov dword [esp + 0x28], eax
push ecx
mov ecx, eax
call fcn.00477370
mov ebx, eax
test ebx, ebx
jne 0x47b00a
push esi
lea ecx, [ebp + 0x14]
call fcn.0046b460
cmp eax, dword [ebp + 0x1c]
jle 0x47affb
push ecx
mov eax, esp
lea ecx, [esp + 0x30]
push 0x100
mov byte [eax], 1
lea eax, [esp + 0x40]
push eax
call fcn.0045c9b0
lea eax, [esp + 0x2c]
push eax
push esi
call fcn.00470510
add esp, 8
lea ecx, [ebp + 0x14]
push 1
push esi
push 0x7d8954
call fcn.0046ba50
lea ecx, [esp + 0x2c]
call fcn.0045caa0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x128
ret 4
cmp byte [ebx + 0xb], 0
je 0x47affb
push dword [0x884adc]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push 0x2c
mov ecx, dword [eax + 0x2c]
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, 0x2c
mov word [eax + 4], cx
movzx ecx, word [ebx + 8]
push ecx
movzx ecx, byte [ebx + 0xa]
push ecx
push esi
mov ecx, eax
call fcn.0047b450
cmp byte [ebx + 0xb], 2
mov edi, eax
mov dword [esp + 0x24], edi
jne 0x47b060
mov word [edi + 0x29], 0x101
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x128
ret 4
cmp byte [ebx + 0x16], 0
setne al
xor edx, edx
mov byte [edi + 0x28], al
mov dword [esp + 0x10], edx
xor eax, eax
xor ebp, ebp
cmp ax, word [ebx + 0x14]
jae 0x47b12b
xor ecx, ecx
mov dword [esp + 0x14], ecx
mov esi, dword [ebx + 0xc]
add esi, ecx
movzx eax, word [esi]
add eax, edx
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x18]
push dword [eax + 0x20]
push dword [esi + 4]
call fcn.0046dbb0
add esp, 8
mov dword [esp + 0x1c], eax
test eax, eax
je 0x47b10f
mov ecx, dword [edi + 0x14]
add edi, 0xc
and ecx, 0x3fffffff
cmp dword [edi + 4], ecx
jne 0x47b0d0
push 0x10
push edi
push 0x7d8954
call fcn.00467c00
add esp, 0xc
nop dword [eax]
mov eax, dword [edi + 4]
xor ecx, ecx
mov edx, eax
inc eax
mov dword [edi + 4], eax
mov eax, 1
shl edx, 4
add edx, dword [edi]
test byte [esi + 0xc], 1
mov edi, dword [esp + 0x24]
cmovne ecx, eax
mov eax, dword [esp + 0x1c]
mov dword [edx], eax
mov eax, dword [esi + 8]
mov dword [edx + 8], eax
mov eax, dword [esp + 0x20]
mov word [edx + 4], ax
mov ax, word [esi + 2]
mov word [edx + 6], ax
mov dword [edx + 0xc], ecx
mov ecx, dword [esp + 0x14]
inc ebp
movzx eax, word [ebx + 0x14]
add ecx, 0x10
mov edx, dword [esp + 0x10]
mov dword [esp + 0x14], ecx
cmp ebp, eax
jl 0x47b084
mov ecx, dword [ebx + 0x10]
test ecx, ecx
je 0x47b154
movsx eax, byte [ebx + 0x17]
add edx, eax
push ecx
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x14], edx
call fcn.00477470
mov edx, dword [esp + 0x10]
mov ebx, eax
test ebx, ebx
jne 0x47b070
xor esi, esi
cmp dword [edi + 0x10], esi
jle 0x47b19a
xor ebx, ebx
nop dword [eax]
mov eax, dword [edi + 0xc]
lea ecx, [esp + 0x2c]
push ecx
mov ecx, dword [esp + 0x1c]
push dword [eax + ebx]
call fcn.0047aa20
test eax, eax
jne 0x47b17e
cmp byte [esp + 0x35], al
jne 0x47b196
inc esi
add ebx, 0x10
cmp esi, dword [edi + 0x10]
jl 0x47b160
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x128
ret 4
mov byte [edi + 0x2a], 1
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x128
ret 4