Function at 0x10053b90
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x1c
push ebx
mov ebx, dword [esp + 0x28]
mov eax, dword [ebx + 0x18]
push ebp
push esi
xor esi, esi
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0xc], 0x20000
mov dword [esp + 0x10], eax
call fcn.10057e50
mov ebp, 0x25
cmp dword [ebx + 0x10], ebp
jge 0x10054098
cmp dword [ebx + 0x2a0], 0xffffffff
je 0x10054098
movzx eax, word [ebx + 0x26c]
test eax, 0x2000
je 0x10053bf8
push 1
push esi
push ebx
push 0xfffffae0
call fcn.1005a550
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0x18
push edi
mov di, word [esp + 0x44]
test di, di
jne 0x10053c20
cmp ax, 1
jne 0x10053c15
mov dword [esp + 0x38], 2
xor esi, esi
jmp 0x10053c5f
movzx ecx, ax
mov dword [esp + 0x38], ecx
xor esi, esi
jmp 0x10053c5f
cmp di, 2
jbe 0x10053c37
push 1
push 0
push ebx
push 0xfffffc15
call fcn.1005a550
mov esi, eax
cmp dword [ebx + 0x10], ebp
jl 0x10053c4d
push 1
push 0
push ebx
push 0xffff8abf
call fcn.1005a550
mov esi, eax
test esi, esi
jne 0x10053f52
cmp di, 1
je 0x10053c5f
mov esi, dword [esp + 0x3c]
lea edx, [esp + 0x10]
movzx eax, si
push edx
push eax
call fcn.1004add0
mov eax, dword [ebx + 0x1c]
test eax, eax
jne 0x10053c98
push 0x11
push ebx
call fcn.10055ad0
test eax, eax
jne 0x10053c98
push 1
push eax
push ebx
push 0xfffffbfb
call fcn.1005a550
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0x18
cmp dword [ebx + 0x30], 0
jne 0x10053cb7
push 1
push 0
push ebx
push 0xffff8ac6
call fcn.1005a550
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0x18
movzx eax, word [esp + 0x38]
cmp eax, 0x2000
jg 0x10053d12
je 0x10053d27
cmp eax, 4
jg 0x10053d06
je 0x10053d60
cmp eax, 0xffffffff
je 0x10053ceb
cmp eax, 2
jne 0x10053d47
mov eax, dword [esp + 0x10]
and eax, 0xfffffffd
or eax, 0x1270
jmp 0x10053d6e
mov eax, dword [esp + 0x10]
or eax, 0x80
and eax, 0xfffffffd
mov dword [esp + 0x38], 0x1002
or eax, 0x1270
jmp 0x10053d6e
sub eax, 0x1002
je 0x10053cda
sub eax, 2
jmp 0x10053d45
cmp eax, 0x2008
jg 0x10053d40
je 0x10053d27
sub eax, 0x2002
je 0x10053d27
sub eax, 2
jne 0x10053d47
push 1
push 0
push ebx
push 0xfffffae0
call fcn.1005a550
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0x18
cmp eax, 0x3004
je 0x10053d60
push 1
push 0
push ebx
push 0xfffffc15
call fcn.1005a550
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0x18
mov eax, dword [esp + 0x10]
and eax, 0xffffff75
or eax, 0x1260
test esi, 0x100
mov dword [esp + 0x10], eax
je 0x10053d81
and eax, 0xffffffdf
mov dword [esp + 0x10], eax
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x38]
push edx
push 1
push ebx
call fcn.10055b20
test eax, eax
mov dword [esp + 0x3c], eax
jne 0x10053db3
push 1
push eax
push ebx
push 0xffff8abf
call fcn.1005a550
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0x18
push eax
call fcn.1005e5f0
test eax, eax
jne 0x10053f54
mov eax, dword [ebx + 0x258]
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
mov dword [esp + 0x48], 0x50
call edi
mov esi, eax
test esi, esi
je 0x10053de1
add esi, 1
mov ecx, dword [ebx + 0x260]
push ecx
call edi
test eax, eax
je 0x10053df1
add eax, 1
cmp dword [ebx + 0x258], 0
je 0x10053e08
lea ecx, [esi + esi]
mov dword [esp + 0x1c], ecx
add ecx, 0x60
mov dword [esp + 0x44], ecx
cmp dword [ebx + 0x260], 0
je 0x10053e23
mov edx, dword [esp + 0x44]
add eax, eax
mov dword [esp + 0x20], eax
lea eax, [edx + eax + 0x16]
mov dword [esp + 0x44], eax
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x14]
push ecx
push ebx
push edx
call fcn.1004af50
test eax, eax
jne 0x10053f54
mov eax, dword [0x1007eed0]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebp, dword [eax + 0x38]
mov ecx, 0x14
mov esi, str.PARAMETERS_P1_TABLEID__SELECT__FROM_P1
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
push str.PARAMETERS_P1_TABLEID__SELECT__FROM_P1
call edi
lea esi, [ebp + eax*2]
mov ebp, dword [esp + 0x1c]
test ebp, ebp
je 0x10053eb4
mov ecx, dword [str._WHERE]
mov dword [esi], ecx
mov edx, dword [0x100766d4]
mov dword [esi + 4], edx
mov eax, dword [0x100766d8]
mov dword [esi + 8], eax
mov ecx, dword [0x100766dc]
push str._WHERE
mov dword [esi + 0xc], ecx
call edi
mov edx, dword [ebx + 0x258]
push ebp
lea esi, [esi + eax*2]
push edx
push esi
call sub.msvcrt.dll_memcpy
add esp, 0xc
shr ebp, 1
lea esi, [esi + ebp*2 - 2]
mov ebp, dword [esp + 0x20]
test ebp, ebp
je 0x10053f12
mov eax, dword [str._ORDER_BY]
mov dword [esi], eax
mov ecx, dword [0x100766e4]
mov dword [esi + 4], ecx
mov edx, dword [0x100766e8]
mov dword [esi + 8], edx
mov eax, dword [0x100766ec]
mov dword [esi + 0xc], eax
mov ecx, dword [0x100766f0]
mov dword [esi + 0x10], ecx
mov dx, word [0x100766f4]
push str._ORDER_BY
mov word [esi + 0x14], dx
call edi
lea esi, [esi + eax*2]
mov eax, dword [ebx + 0x260]
push ebp
push eax
push esi
call sub.msvcrt.dll_memcpy
add esp, 0xc
shr ebp, 1
lea esi, [esi + ebp*2 - 2]
mov word [esi], 0x3b
lea ecx, [esp + 0x18]
push ecx
mov word [esi + 2], 0
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x38]
push 0
push edx
push eax
call dword [0x1007ef38]
test eax, eax
push 0
jge 0x10053f5e
mov ecx, dword [esp + 0x38]
push ecx
push ebx
push eax
call fcn.1005a1e0
mov edx, dword [esp + 0x14]
push edx
mov esi, eax
call fcn.1004b060
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0x18
mov eax, dword [esp + 0x48]
mov esi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
push 0
shr eax, 1
push eax
mov eax, dword [0x1007eed0]
push eax
call esi
mov ecx, dword [eax + 0x38]
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x40]
push ecx
push edx
push eax
call dword [0x1007f04c]
test eax, eax
jl 0x10053fce
mov ecx, dword [0x1007eed0]
push ecx
call esi
mov eax, dword [eax + 0x38]
mov dword [eax], 0xff
mov edx, dword [ebx + 0x2a0]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x28]
push edx
mov edx, dword [esp + 0x3c]
push 8
push eax
mov eax, dword [esp + 0x28]
push eax
push ecx
push edx
call dword [0x1007ef6c]
test eax, eax
jge 0x10054026
cmp eax, 0xfffff429
jne 0x10053fe8
push 1
push 0
push ebx
push 0xfffffae0
call fcn.1005a550
mov esi, eax
jmp 0x10054000
test eax, eax
jge 0x10053ffe
mov ecx, dword [esp + 0x34]
push 0
push ecx
push ebx
push eax
call fcn.1005a1e0
mov esi, eax
jmp 0x10054000
xor esi, esi
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x34]
push edx
push eax
call dword [0x1007ef1c]
mov ecx, dword [esp + 0x14]
push ecx
call fcn.1004b060
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0x18
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x10]
mov esi, dword [esp + 0x14]
push 0
push 0
push edx
push eax
mov eax, dword [esp + 0x4c]
push ecx
mov ecx, dword [esp + 0x44]
push 0xffffffffffffffff
lea edx, [ebx + 0x3a]
push edx
mov edx, dword [esp + 0x50]
push eax
push ecx
push edx
push esi
call fcn.10053540
push esi
mov edi, eax
call fcn.1004b060
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x34]
push eax
push ecx
call dword [0x1007ef1c]
test eax, eax
jge 0x1005408c
mov edx, dword [esp + 0x34]
push 0
push edx
push ebx
push eax
call fcn.1005a1e0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0x18
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0x18
push 1
push esi
push ebx
push 0xffff8abf
call fcn.1005a550
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0x18