Function at 0x503db0
Capabilities:
Get thread local storage value

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
push dword [0x884adc]
mov ebp, ecx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 8], 0x100
mov edi, dword [eax + 0xc]
mov dword [esp + 0x10], edi
lea ecx, [edi + 0x100]
jl 0x503de3
cmp ecx, dword [eax + 0x10]
ja 0x503de3
mov dword [eax + 0xc], ecx
jmp 0x503df5
push 0x100
mov ecx, eax
call fcn.0046a3c0
mov edi, eax
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x20]
xor eax, eax
xor ebx, ebx
mov edx, dword [ecx + 8]
add edx, dword [ecx + 4]
je 0x503e90
mov eax, dword [ebp + 0xc]
mov esi, dword [eax + 0xf0]
test edi, edi
je 0x503e7e
mov ecx, dword [ecx + 0xc]
mov eax, dword [esp + 0x18]
mov word [edi], 0x12
mov byte [edi + 2], 1
mov dword [edi + 0x14], ebx
lea ecx, [eax + ecx*4]
mov dword [edi + 0x18], ebx
mov eax, 0x50
mov word [edi + 4], ax
or eax, 0xffffffff
mov word [edi + 6], ax
mov eax, 0xffff
mov word [edi + 0x10], ax
mov eax, dword [esp + 0x1c]
movups xmm0, xmmword [eax + 0x50]
xor eax, eax
mov dword [edi + 0x2c], ecx
mov word [edi + 0x10], ax
mov word [edi + 0x24], ax
mov byte [edi + 0x2a], al
mov dword [edi + 0x20], eax
mov al, byte [esp + 0x24]
mov byte [edi + 0x44], al
mov eax, edi
movups xmmword [edi + 0x30], xmm0
mov word [edi + 0x26], dx
mov word [edi + 0x28], si
mov byte [edi + 1], 1
jmp 0x503e80
xor eax, eax
xor ecx, ecx
mov word [eax + 0x24], cx
lea eax, [edx - 1]
cdq
idiv esi
lea ebx, [ecx + 1]
inc eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0xf4]
mov ecx, dword [ecx + 0xf0]
cmp ecx, edx
cmovg edx, ecx
push edx
push eax
call fcn.0052dd80
add esp, 8
mov dword [esp + 0x18], eax
mov dword [eax + 0xc], 0
mov dword [eax + 0x10], 0
test ebx, ebx
jle 0x503f1a
lea esi, [edi + 0x14]
mov edi, dword [esp + 0x20]
nop dword [eax + eax]
cmp byte [esi - 0x14], 0x13
lea ecx, [esi - 0x14]
mov dword [esi + 0xc], eax
mov eax, dword [edi]
mov dword [esi], eax
mov eax, dword [edi]
mov ax, word [eax + 0x20]
mov word [esi - 4], ax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x74]
mov dword [esi + 8], eax
jne 0x503efc
mov eax, dword [esi + 0x2c]
shl eax, 4
mov dword [esi + 0x2c], eax
push 1
push ecx
mov ecx, dword [ebp + 0xc0]
call fcn.0064ee60
mov eax, dword [esp + 0x18]
add esi, 0x50
sub ebx, 1
jne 0x503ed0
mov edi, dword [esp + 0x10]
mov ecx, dword [esp + 0x28]
test ecx, ecx
je 0x503f63
mov word [ecx], 0x11
mov eax, 0x30
mov byte [ecx + 2], 2
mov word [ecx + 4], ax
or eax, 0xffffffff
mov word [ecx + 6], ax
movzx eax, word [edi + 0x10]
mov word [ecx + 0x10], ax
mov eax, dword [edi + 0x14]
mov dword [ecx + 0x14], eax
mov eax, dword [edi + 0x18]
mov dword [ecx + 0x18], eax
mov eax, dword [edi + 0x1c]
mov dword [ecx + 0x1c], eax
movzx eax, word [edi + 0x10]
mov word [ecx + 0x10], ax
mov eax, dword [edi + 0x20]
mov dword [ecx + 0x20], eax
mov eax, dword [edi + 0x14]
mov dword [ecx + 0x14], eax
push dword [0x884adc]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 8], 0x100
jl 0x503f99
lea ecx, [edi + 0x100]
cmp ecx, dword [eax + 0xc]
jne 0x503f99
cmp dword [eax + 0x14], edi
je 0x503f99
mov dword [eax + 0xc], edi
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 0x14
push 0x100
push edi
mov ecx, eax
call fcn.0046a590
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 0x14