Function at 0x5180b0
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0xc
push ebx
push ebp
mov ebp, dword [esp + 0x1c]
mov eax, dword [ebp + 0x78]
xor ebx, ebx
cmp eax, ebx
mov byte [esp + 0xb], 0
mov dword [esp + 0x10], ebx
jbe 0x518489
push esi
push edi
mov eax, dword [ebp + 0x74]
xor ecx, ecx
cmp eax, ebx
mov byte [esp + 0x24], 0
mov dword [esp + 0x14], ecx
jbe 0x51846b
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x5180fe
mov eax, dword [eax + ecx*4]
mov ecx, dword [esp + 0x18]
cmp dword [eax + ecx*4], ebx
jne 0x51844f
mov edi, dword [esp + 0x20]
mov edx, dword [edi + 0x170]
add edi, 0x170
push ebp
mov ecx, edi
call dword [edx + 4]
mov ecx, dword [edi + 8]
mov esi, dword [ecx + eax*4]
cmp esi, ebx
je 0x518143
mov edi, edi
mov eax, dword [esi + 4]
mov edx, dword [edi]
push eax
push ebp
mov ecx, edi
call dword [edx + 8]
test al, al
jne 0x518138
mov esi, dword [esi]
cmp esi, ebx
jne 0x518120
jmp 0x518143
mov edi, dword [esi + 8]
cmp edi, ebx
jne 0x5181da
push ebp
push str.Creating_cell_context_for_0x_x
mov eax, 3
call fcn.00516e70
push 0x24
call fcn.005354b8
mov esi, eax
add esp, 0xc
cmp esi, ebx
je 0x5181b6
mov dword [esi + 0xc], ebx
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi], 0x713ab4
push 0x94
mov dword [esi + 0x10], 0x713ad8
mov dword [esi + 0x14], 0x25
mov dword [esi + 0x1c], ebx
call fcn.005354dd
mov ecx, dword [esi + 0x14]
shl ecx, 2
mov edx, ecx
mov edi, eax
shr ecx, 2
mov dword [esi + 0x18], edi
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 4
and ecx, 3
rep stosb byte es:[edi], al
mov dword [esi + 0x10], 0x713af4
mov edi, esi
jmp 0x5181b8
xor edi, edi
mov eax, dword [esp + 0x20]
push ebx
push 1
push ebp
call fcn.0051b510
mov esi, dword [esp + 0x20]
push edi
mov ebx, ebp
add esi, 0x170
mov dword [edi + 0x20], eax
call fcn.005197c0
movzx esi, word [esp + 0x14]
movzx eax, word [esp + 0x18]
mov edx, dword [edi + 0x10]
shl esi, 0x10
or esi, eax
add edi, 0x10
push esi
mov ecx, edi
call dword [edx + 4]
mov ecx, dword [edi + 8]
mov ebx, dword [ecx + eax*4]
test ebx, ebx
je 0x51821a
nop
mov eax, dword [ebx + 4]
mov edx, dword [edi]
push eax
push esi
mov ecx, edi
call dword [edx + 8]
test al, al
jne 0x51844d
mov ebx, dword [ebx]
test ebx, ebx
jne 0x518200
mov esi, dword [esp + 0x18]
mov ebx, dword [esp + 0x14]
mov edi, dword [esp + 0x20]
mov eax, dword [esp + 0x28]
push esi
push ebx
push 5
mov edx, ebp
mov ecx, edi
call fcn.00518d60
cmp al, 1
jne 0x518369
mov al, byte [edi + 0xcc]
test al, al
jne 0x5182a2
lea ecx, [ebp + 0x14]
push ecx
push esi
push ebx
push str.Requiring_cell___dx_d_:__s_
mov eax, 2
call fcn.00516e70
mov eax, dword [0x728c28]
mov edx, dword [edi + 0xc8]
add esp, 0x10
cmp eax, 0xffffffff
mov dword [esp + 0x24], edx
je 0x51828e
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x51828e
mov ecx, dword [esp + 0x24]
or edx, 0xffffffff
call fcn.004fc390
jmp 0x51829b
mov eax, dword [esp + 0x24]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov byte [edi + 0xcc], 1
push ebx
mov eax, esi
mov ecx, ebp
mov edx, edi
call fcn.00519090
mov eax, dword [ebp + 8]
test eax, eax
je 0x51835f
mov ecx, dword [eax + ebx*4]
cmp dword [ecx + esi*4], 0
je 0x51835f
mov eax, dword [0x728c28]
cmp eax, 0xffffffff
mov ebx, dword [edi + 0xd4]
je 0x5182ed
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x5182ed
or edx, 0xffffffff
mov ecx, ebx
call fcn.004fc390
jmp 0x5182f6
push 0xffffffffffffffff
push ebx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, edi
call fcn.005196c0
mov ebx, eax
mov dword [ebx + 4], ebp
mov eax, dword [ebp + 8]
test eax, eax
je 0x518315
mov edx, dword [esp + 0x14]
mov eax, dword [eax + edx*4]
mov esi, dword [eax + esi*4]
jmp 0x518317
xor esi, esi
mov dword [ebx], esi
mov edx, dword [edi + 0xf8]
lea esi, [edi + 0xf8]
mov ecx, esi
call dword [edx + 4]
mov dword [eax + 8], ebx
mov dword [eax + 4], 0
mov ecx, dword [esi + 4]
mov dword [eax], ecx
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x518345
mov dword [ecx + 4], eax
jmp 0x518348
mov dword [esi + 8], eax
mov ecx, dword [esi + 0xc]
inc ecx
mov dword [esi + 4], eax
mov dword [esi + 0xc], ecx
mov edx, dword [edi + 0xd4]
push edx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov byte [esp + 0x24], 1
jmp 0x51844d
mov eax, dword [esp + 0x28]
push esi
push ebx
push 4
mov edx, ebp
mov ecx, edi
call fcn.00518d60
cmp al, 1
jne 0x518445
push ebx
mov eax, esi
mov ecx, ebp
mov edx, edi
call fcn.00519090
mov eax, dword [ebp + 8]
test eax, eax
je 0x51843e
mov eax, dword [eax + ebx*4]
cmp dword [eax + esi*4], 0
je 0x51843e
mov eax, dword [0x728c28]
cmp eax, 0xffffffff
mov ebx, dword [edi + 0xd4]
je 0x5183cd
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x5183cd
or edx, 0xffffffff
mov ecx, ebx
call fcn.004fc390
jmp 0x5183d6
push 0xffffffffffffffff
push ebx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, edi
call fcn.005196c0
mov ebx, eax
mov dword [ebx + 4], ebp
mov eax, dword [ebp + 8]
test eax, eax
je 0x5183f5
mov ecx, dword [esp + 0x14]
mov edx, dword [eax + ecx*4]
mov esi, dword [edx + esi*4]
jmp 0x5183f7
xor esi, esi
mov dword [ebx], esi
mov eax, dword [edi + 0xf8]
lea esi, [edi + 0xf8]
mov ecx, esi
call dword [eax + 4]
mov dword [eax + 8], ebx
mov dword [eax], 0
mov ecx, dword [esi + 8]
mov dword [eax + 4], ecx
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x518424
mov dword [ecx], eax
jmp 0x518427
mov dword [esi + 4], eax
mov ecx, dword [esi + 0xc]
inc ecx
mov dword [esi + 8], eax
mov dword [esi + 0xc], ecx
mov edx, dword [edi + 0xd4]
push edx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov byte [esp + 0x24], 1
jmp 0x51844d
mov al, byte [esp + 0x24]
test al, al
jne 0x518491
xor ebx, ebx
mov ecx, dword [esp + 0x14]
mov eax, dword [ebp + 0x74]
inc ecx
cmp ecx, eax
mov dword [esp + 0x14], ecx
jb 0x5180e7
mov al, byte [esp + 0x24]
test al, al
jne 0x518493
mov al, byte [esp + 0x13]
test al, al
jne 0x518487
mov eax, dword [esp + 0x18]
mov ecx, dword [ebp + 0x78]
inc eax
cmp eax, ecx
mov dword [esp + 0x18], eax
jb 0x5180d1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 0xc
xor ebx, ebx
mov byte [esp + 0x13], 1
jmp 0x518473