Function at 0x10018d20
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xd4
mov eax, dword [0x1010e07c]
xor eax, esp
mov dword [esp + 0xd0], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0xc]
xor esi, esi
mov ebx, ecx
mov dword [esp + 0x14], eax
mov dword [eax], esi
mov eax, dword [ebx + 0x30]
push edi
mov edi, edx
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], esi
cmp eax, 0xa029a697
jne 0x10018dfd
mov dword [ebx + 0x30], 0xf03b7906
cmp dword [ebx], esi
jle 0x10018daa
mov dword [esp + 0xc], esi
jmp 0x10018d80
mov ecx, dword [ebx + 4]
mov edx, dword [esp + 0xc]
mov edi, dword [edx + ecx + 4]
test edi, edi
je 0x10018d9c
call fcn.10022c10
test eax, eax
jne 0x10018e29
add dword [esp + 0xc], 0x18
inc esi
cmp esi, dword [ebx]
jl 0x10018d80
mov edi, dword [esp + 0x14]
push 0xb4
lea eax, [esp + 0x24]
push 0
push eax
call fcn.100b2ed0
mov edx, dword [esp + 0x28]
add esp, 0xc
lea ecx, [esp + 0x10]
push ecx
push edx
lea eax, [esp + 0x28]
push eax
mov dword [esp + 0x2c], ebx
call fcn.10031bf0
add esp, 0xc
cmp dword [0x10112c64], 0
je 0x10018e9b
cmp dword [0x10112c70], 0
jle 0x10018e9b
mov eax, 7
jmp 0x10018ea6
cmp eax, 0xf03b7906
jne 0x10018e0f
or dword [ebx + 8], 4
mov dword [ebx + 0x30], 0xb5357930
mov eax, 0x15
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xd0]
xor ecx, esp
call fcn.100b2b2c
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebx + 4]
lea eax, [esi + esi*2]
mov edx, dword [ecx + eax*8]
push edx
push str.database_schema_is_locked:__s
push 6
mov ecx, ebx
call fcn.1001a310
mov eax, dword [ebx + 0x30]
add esp, 0xc
cmp eax, 0xf03b7906
jne 0x10018e6f
mov dword [ebx + 0x30], 0xa029a697
mov eax, 6
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xd0]
xor ecx, esp
call fcn.100b2b2c
mov esp, ebp
pop ebp
ret
cmp eax, 0xa029a697
jne 0x10018e81
or dword [ebx + 8], 4
mov dword [ebx + 0x30], 0xb5357930
mov eax, 6
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xd0]
xor ecx, esp
call fcn.100b2b2c
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x24]
cmp eax, 0x65
jne 0x10018eaa
xor eax, eax
mov dword [esp + 0x24], eax
cmp byte [esp + 0x32], 0
je 0x10018ecc
push ebx
call fcn.10018b00
add esp, 4
test eax, eax
jne 0x10018ec8
mov dword [esp + 0x24], 0x11
jmp 0x10018ed1
mov eax, dword [esp + 0x24]
cmp eax, 0x11
jne 0x10018edf
push 0
call fcn.1002a390
mov eax, dword [esp + 0x28]
add esp, 4
test edi, edi
je 0x10018eec
mov ecx, dword [esp + 0xc0]
mov dword [edi], ecx
mov edi, eax
test eax, eax
jne 0x100190b1
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x100190b5
mov cl, byte [esp + 0xa0]
test cl, cl
je 0x100190b5
push eax
cmp cl, 2
jne 0x10018fb2
lea eax, [edi + 3]
call fcn.100274a0
add esp, 4
cmp dword [0x10112c64], edi
je 0x10018f36
cmp dword [0x10112c70], edi
jg 0x10018f51
mov edx, dword [esp + 0x2c]
mov eax, dword [edx + 0x34]
push 0
push 1
push 0xffffffffffffffff
push str.order
push eax
call fcn.10025db0
add esp, 0x14
cmp dword [0x10112c64], 0
je 0x10018f63
cmp dword [0x10112c70], 0
jg 0x10018f81
mov ecx, dword [esp + 0x2c]
mov edx, dword [ecx + 0x34]
push 0
push 1
push 0xffffffffffffffff
add edx, 0x40
push str.from
push edx
call fcn.10025db0
add esp, 0x14
cmp dword [0x10112c64], 0
je 0x10018f97
cmp dword [0x10112c70], 0
jg 0x100190b1
mov eax, dword [esp + 0x2c]
mov ecx, dword [eax + 0x34]
push 0
push 1
push 0xffffffffffffffff
push str.detail
sub ecx, 0xffffff80
push ecx
jmp 0x100190a9
mov eax, 5
call fcn.100274a0
add esp, 4
cmp dword [0x10112c64], 0
je 0x10018fd1
cmp dword [0x10112c70], 0
jg 0x10018fec
mov edx, dword [esp + 0x2c]
mov eax, dword [edx + 0x34]
push 0
push 1
push 0xffffffffffffffff
push str.addr
push eax
call fcn.10025db0
add esp, 0x14
cmp dword [0x10112c64], 0
je 0x10018ffe
cmp dword [0x10112c70], 0
jg 0x1001901c
mov ecx, dword [esp + 0x2c]
mov edx, dword [ecx + 0x34]
push 0
push 1
push 0xffffffffffffffff
add edx, 0x40
push str.opcode
push edx
call fcn.10025db0
add esp, 0x14
cmp dword [0x10112c64], 0
je 0x1001902e
cmp dword [0x10112c70], 0
jg 0x1001904c
mov eax, dword [esp + 0x2c]
mov ecx, dword [eax + 0x34]
push 0
push 1
push 0xffffffffffffffff
sub ecx, 0xffffff80
push 0x100f2004
push ecx
call fcn.10025db0
add esp, 0x14
cmp dword [0x10112c64], 0
je 0x1001905e
cmp dword [0x10112c70], 0
jg 0x1001907e
mov edx, dword [esp + 0x2c]
mov eax, dword [edx + 0x34]
push 0
push 1
push 0xffffffffffffffff
add eax, 0xc0
push 0x100f2008
push eax
call fcn.10025db0
add esp, 0x14
cmp dword [0x10112c64], 0
je 0x10019090
cmp dword [0x10112c70], 0
jg 0x100190b1
mov ecx, dword [esp + 0x2c]
mov edx, dword [ecx + 0x34]
push 0
push 1
push 0xffffffffffffffff
push 0x100f200c
add edx, 0x100
push edx
call fcn.10025db0
add esp, 0x14
mov eax, dword [esp + 0x2c]
mov ecx, dword [ebx + 0x30]
cmp ecx, 0xf03b7906
jne 0x100190d3
mov dword [ebx + 0x30], 0xa029a697
test edi, edi
jne 0x100190eb
mov ecx, dword [esp + 0x18]
mov dword [ecx], eax
jmp 0x1001911a
cmp ecx, 0xa029a697
jne 0x100190e6
or dword [ebx + 8], 4
mov dword [ebx + 0x30], 0xb5357930
mov edi, 0x15
test eax, eax
je 0x1001911a
mov ecx, dword [eax + 0x50]
mov esi, eax
cmp ecx, 0xbdf20da3
je 0x1001910e
cmp ecx, 0x519c2973
je 0x1001910e
cmp ecx, 0x26bceaa5
je 0x10019113
jmp 0x1001911a
call fcn.10027cb0
mov eax, esi
call fcn.10027de0
mov eax, dword [esp + 0x10]
mov ecx, ebx
test eax, eax
je 0x10019146
push eax
push 0x100f2010
push edi
call fcn.1001a310
mov eax, dword [esp + 0x1c]
add esp, 0xc
test eax, eax
je 0x10019151
push eax
call fcn.100b3828
add esp, 4
jmp 0x10019151
push 0
push edi
call fcn.1001a310
add esp, 8
cmp dword [0x10112c64], 0
mov esi, 1
je 0x10019189
cmp dword [0x10112c70], 0
jle 0x10019189
sub dword [0x10112c70], esi
push 0
push 7
mov ecx, ebx
mov dword [0x10112c64], 0
call fcn.1001a310
add esp, 8
lea edi, [esi + 6]
cmp dword [0x10112c74], 0
jne 0x100191b6
add dword [0x10112c70], esi
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
sub dword [0x10112c70], esi
mov dword [0x101128cc], eax
cmp eax, 0xffffffff
je 0x100191fe
mov dword [0x10112c74], esi
jmp 0x100191bb
mov eax, dword [0x101128cc]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x100191fe
mov ecx, 0x100f0274
mov esi, eax
mov edx, 0xc
sub esi, ecx
mov ebx, dword [esi + ecx]
cmp ebx, dword [ecx]
jne 0x100191fe
sub edx, 4
add ecx, 4
cmp edx, 4
jae 0x100191d4
push eax
call fcn.100b3828
mov edx, dword [0x101128cc]
add esp, 4
push 0
push edx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, dword [esp + 0xdc]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.100b2b2c
mov esp, ebp
pop ebp
ret