Function at 0x5185c0
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x154
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebp + 0xc]
xor eax, eax
push edi
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x30], eax
mov eax, dword [ebx + 0xaa78]
mov esi, dword [eax + 0x38]
and esi, 0xfffff
push esi
lea ecx, [ebp - 0x30]
push ecx
lea edx, [ebp - 0xd0]
push edx
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp - 0x150]
push edx
push 0x428c70
push eax
mov ecx, ebx
mov dword [ebp - 0x2c], 1
mov dword [ebp - 0x28], 2
mov dword [ebp - 0x24], 3
mov dword [ebp - 0x1c], esi
call fcn.004e14d0
test eax, eax
je 0x51865f
push edi
push esi
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0xd0]
push ecx
mov ecx, dword [ebx + 0xaa78]
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x150]
push eax
push 0x428d10
push ecx
mov ecx, ebx
call fcn.004e14d0
test eax, eax
jne 0x518a01
lea edx, [ebp - 0xd0]
lea eax, [ebp - 0xc0]
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], edx
mov dword [ebp - 0xc], eax
xor edi, edi
test esi, esi
jbe 0x5186eb
mov bl, byte [ebx + 0xab]
shr bl, 4
and bl, 1
mov byte [ebp - 1], bl
jmp 0x518693
mov bl, byte [ebp - 1]
test bl, bl
mov eax, dword [edx]
mov ecx, dword [ebp + edi*4 - 0xa0]
je 0x5186b3
mov ebx, dword [ecx + 0x48]
xor ebx, dword [eax + 0x48]
cmp ebx, 0x400
jne 0x5186eb
cmp dword [ecx + 0x44], eax
jmp 0x5186df
mov ebx, dword [eax + 0x10]
cmp ebx, dword [ecx + 0x10]
jne 0x5186eb
mov ebx, dword [eax + 0x24]
cmp ebx, dword [ecx + 0x24]
jne 0x5186eb
mov ebx, dword [eax + 0x28]
cmp ebx, dword [ecx + 0x28]
jne 0x5186eb
mov ebx, dword [eax + 0x2c]
cmp ebx, dword [ecx + 0x2c]
jne 0x5186eb
mov ecx, dword [ecx + 0x48]
xor ecx, dword [eax + 0x48]
cmp ecx, 0x400
jne 0x5186eb
add edi, 1
add edx, 4
cmp edi, esi
jb 0x518690
cmp edi, esi
jne 0x5188a6
mov eax, dword [0x776138]
test eax, eax
jge 0x518700
xor eax, eax
jmp 0x518707
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 0x10], 0
je 0x51872e
mov ecx, dword [eax + 0x10]
test ecx, ecx
jne 0x518718
mov ebx, ecx
jmp 0x51873c
mov edx, dword [ecx]
test edx, edx
mov dword [eax + 0x10], edx
jne 0x518724
mov dword [eax + 0x14], edx
mov dword [ecx], 0xfefefefe
mov ebx, ecx
jmp 0x51873c
mov ecx, dword [eax + 0xc]
push 0x10
push 0x40
call fcn.007515ae
mov ebx, eax
xor eax, eax
cmp ebx, eax
je 0x5188cd
push eax
mov dword [ebx], eax
mov dword [ebx + 8], eax
mov dword [ebx + 0x38], eax
mov dword [ebx + 4], eax
mov word [ebx + 0x3c], ax
mov dword [ebx + 0xc], eax
mov word [ebx + 0x3e], ax
mov dword [ebx + 0x14], eax
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x1c], eax
mov dword [ebx + 0x24], eax
mov dword [ebx + 0x30], eax
mov dword [ebx + 0x34], eax
lea edi, [ebx + 4]
or ecx, 0xffffffff
mov eax, esi
and eax, 0xfffff
mov dword [ebx + 0x10], ecx
mov dword [ebx + 0x20], ecx
lea ecx, [esi + esi*2]
or eax, 0x70100000
push ebx
mov edx, esi
call fcn.004cc5e0
test eax, eax
mov dword [ebp - 8], eax
jl 0x5188db
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xaa78]
mov ecx, dword [eax + 0x30]
mov dword [ebx + 0x30], ecx
mov edx, dword [eax + 0x34]
mov eax, dword [ebp + 8]
mov dword [ebx + 0x34], edx
mov ecx, dword [eax + 0xaa78]
mov edx, dword [ecx + 0xc]
mov eax, dword [ebx + 0xc]
add esi, esi
add esi, esi
push esi
push edx
push eax
call sub.msvcrt.dll_memcpy
mov edx, dword [edi]
add esp, 0xc
push esi
lea ecx, [ebp - 0xb0]
push ecx
push edx
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add esp, 0xc
push esi
push eax
add ecx, esi
push ecx
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0x1c]
mov ecx, dword [edi]
add eax, eax
add esp, 0xc
add eax, eax
add eax, eax
push esi
lea edx, [ebp - 0xa0]
push edx
add ecx, eax
push ecx
mov dword [ebp - 8], eax
call sub.msvcrt.dll_memcpy
mov edx, dword [ebx + 0xc]
mov esi, dword [edx]
mov eax, dword [edi]
mov edx, dword [ebp - 8]
mov ecx, dword [eax]
mov eax, dword [edx + eax]
mov edx, dword [esi + 0x10]
add esp, 0xc
cmp edx, dword [ecx + 0x10]
mov dword [ebp - 0x24], ecx
mov dword [ebp - 8], eax
jne 0x51883e
mov eax, dword [esi + 0x28]
cmp eax, dword [ecx + 0x28]
je 0x518858
mov eax, dword [ebp - 8]
cmp edx, dword [eax + 0x10]
jne 0x51884b
mov ecx, dword [esi + 0x28]
cmp ecx, dword [eax + 0x28]
je 0x518858
mov ecx, dword [ebp + 8]
cmp edx, dword [ecx + 0x28fc]
je 0x518864
jmp 0x51885b
mov ecx, dword [ebp + 8]
test byte [ecx + 0xab], 0x10
je 0x518887
mov edx, dword [ecx]
mov eax, dword [edx + 0x3c]
push 0
push ebx
call eax
test al, al
jne 0x518887
mov esi, dword [esi + 0x10]
mov eax, dword [esi + 8]
and eax, 0x20
xor ecx, ecx
xor esi, esi
or eax, ecx
je 0x51898a
mov esi, edi
lea edi, [ebx + 0x3c]
call fcn.004cc530
lea esi, [ebx + 0xc]
lea edi, [ebx + 0x3e]
call fcn.004cc530
mov esi, ebx
call fcn.004ce8a0
mov esi, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
sub dword [ebp - 0xc], 0x10
add eax, 1
add edx, 0x10
cmp eax, 2
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], edx
jae 0x518a01
mov ebx, dword [ebp + 8]
jmp 0x518678
mov eax, 0x8007000e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp word [ebx + 0x3c], 0
je 0x51892b
mov eax, dword [0x776138]
test eax, eax
jge 0x5188ef
xor eax, eax
jmp 0x5188f6
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
movzx ecx, word [ebx + 0x3c]
cmp ecx, dword [eax + 0x120]
ja 0x51891e
mov edx, dword [ebx + 4]
mov eax, dword [eax + 0x11c]
shl ecx, 4
test edx, edx
lea ecx, [ecx + eax - 0x10]
je 0x51891e
mov eax, dword [ecx + 4]
mov dword [edx], eax
mov dword [ecx + 4], edx
mov word [ebx + 0x3c], 0
mov dword [ebx + 4], 0
cmp word [ebx + 0x3e], 0
je 0x518977
mov eax, dword [0x776138]
test eax, eax
jge 0x51893f
xor eax, eax
jmp 0x518946
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
movzx ecx, word [ebx + 0x3e]
cmp ecx, dword [eax + 0x120]
ja 0x51896e
mov edx, dword [ebx + 0xc]
mov eax, dword [eax + 0x11c]
shl ecx, 4
test edx, edx
lea eax, [ecx + eax - 0x10]
je 0x51896e
mov ecx, dword [eax + 4]
mov dword [edx], ecx
mov dword [eax + 4], edx
xor eax, eax
mov word [ebx + 0x3e], ax
mov dword [ebx + 0xc], eax
mov esi, ebx
call fcn.004ce8a0
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov dl, byte [ebp + 0xc]
test dl, dl
jne 0x5189a5
mov eax, dword [ebp - 0x150]
mov ecx, dword [eax + 0x38]
mov dword [ebp + 0xc], ecx
mov dword [eax + 0x38], esi
mov dword [eax], esi
mov dword [eax + 8], esi
mov edi, dword [ebp + 8]
test byte [edi + 0xab], 0x10
je 0x518a0f
mov eax, dword [ebp - 0x24]
test byte [eax + 0x48], 1
jne 0x518a0f
mov ecx, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x24], eax
mov eax, ecx
and eax, 4
or eax, esi
je 0x5189d5
and ecx, 0x10
xor eax, eax
or ecx, eax
jne 0x518a0f
call fcn.004c9ab0
mov ecx, dword [edi + 0xaa78]
mov esi, dword [ecx + 0x34]
push 0x461d2c
push 0x125f
call fcn.004f6060
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x150]
add esp, 8
mov dword [eax + 0x38], edx
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
test dl, dl
jne 0x518a5d
mov edx, dword [ebp - 0x10]
xor ecx, ecx
cmp edx, esi
jbe 0x518a36
lea esp, [esp]
mov eax, dword [ebp + ecx*4 - 0x150]
add ecx, 1
cmp ecx, edx
mov dword [eax + 0x38], esi
mov dword [eax], esi
mov dword [eax + 8], esi
jb 0x518a20
or edx, 0xffffffff
mov ecx, ebx
call fcn.00482d90
mov ecx, dword [edi + 0xaa78]
push 1
push 1
push ebx
push ecx
push edi
call fcn.004ca960
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov edx, dword [edi + 0xaa78]
push ebx
push edx
call fcn.004ccff0
mov esi, eax
call fcn.004c9ab0
test esi, esi
jge 0x518a80
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, edi
mov eax, dword [eax + 0xaa78]
mov ecx, dword [eax + 0x30]
mov dword [eax + 0x30], ecx
mov edx, dword [eax + 0x34]
pop edi
pop esi
mov dword [eax + 0x34], edx
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 8