Function at 0x1002c780
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 [0x100eb6ac]
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 0x1002c85d
mov dword [ebx + 0x30], 0xf03b7906
cmp dword [ebx], esi
jle 0x1002c80a
mov dword [esp + 0xc], esi
jmp 0x1002c7e0
mov ecx, dword [ebx + 4]
mov edx, dword [esp + 0xc]
mov edi, dword [edx + ecx + 4]
test edi, edi
je 0x1002c7fc
call fcn.100365d0
test eax, eax
jne 0x1002c889
add dword [esp + 0xc], 0x18
inc esi
cmp esi, dword [ebx]
jl 0x1002c7e0
mov edi, dword [esp + 0x14]
push 0xb4
lea eax, [esp + 0x24]
push 0
push eax
call fcn.100a39b0
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.100455b0
add esp, 0xc
cmp dword [0x100f0574], 0
je 0x1002c8fb
cmp dword [0x100f0580], 0
jle 0x1002c8fb
mov eax, 7
jmp 0x1002c906
cmp eax, 0xf03b7906
jne 0x1002c86f
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.1009c0cb
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.1002dcd0
mov eax, dword [ebx + 0x30]
add esp, 0xc
cmp eax, 0xf03b7906
jne 0x1002c8cf
mov dword [ebx + 0x30], 0xa029a697
mov eax, 6
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xd0]
xor ecx, esp
call fcn.1009c0cb
mov esp, ebp
pop ebp
ret
cmp eax, 0xa029a697
jne 0x1002c8e1
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.1009c0cb
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x24]
cmp eax, 0x65
jne 0x1002c90a
xor eax, eax
mov dword [esp + 0x24], eax
cmp byte [esp + 0x32], 0
je 0x1002c92c
push ebx
call fcn.1002c580
add esp, 4
test eax, eax
jne 0x1002c928
mov dword [esp + 0x24], 0x11
jmp 0x1002c931
mov eax, dword [esp + 0x24]
cmp eax, 0x11
jne 0x1002c93f
push 0
call fcn.1003dd40
mov eax, dword [esp + 0x28]
add esp, 4
test edi, edi
je 0x1002c94c
mov ecx, dword [esp + 0xc0]
mov dword [edi], ecx
mov edi, eax
test eax, eax
jne 0x1002cb11
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x1002cb15
mov cl, byte [esp + 0xa0]
test cl, cl
je 0x1002cb15
push eax
cmp cl, 2
jne 0x1002ca12
lea eax, [edi + 3]
call fcn.1003ae60
add esp, 4
cmp dword [0x100f0574], edi
je 0x1002c996
cmp dword [0x100f0580], edi
jg 0x1002c9b1
mov edx, dword [esp + 0x2c]
mov eax, dword [edx + 0x34]
push 0
push 1
push 0xffffffffffffffff
push str.order
push eax
call fcn.10039770
add esp, 0x14
cmp dword [0x100f0574], 0
je 0x1002c9c3
cmp dword [0x100f0580], 0
jg 0x1002c9e1
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.10039770
add esp, 0x14
cmp dword [0x100f0574], 0
je 0x1002c9f7
cmp dword [0x100f0580], 0
jg 0x1002cb11
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 0x1002cb09
mov eax, 5
call fcn.1003ae60
add esp, 4
cmp dword [0x100f0574], 0
je 0x1002ca31
cmp dword [0x100f0580], 0
jg 0x1002ca4c
mov edx, dword [esp + 0x2c]
mov eax, dword [edx + 0x34]
push 0
push 1
push 0xffffffffffffffff
push str.addr
push eax
call fcn.10039770
add esp, 0x14
cmp dword [0x100f0574], 0
je 0x1002ca5e
cmp dword [0x100f0580], 0
jg 0x1002ca7c
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.10039770
add esp, 0x14
cmp dword [0x100f0574], 0
je 0x1002ca8e
cmp dword [0x100f0580], 0
jg 0x1002caac
mov eax, dword [esp + 0x2c]
mov ecx, dword [eax + 0x34]
push 0
push 1
push 0xffffffffffffffff
sub ecx, 0xffffff80
push 0x100d6134
push ecx
call fcn.10039770
add esp, 0x14
cmp dword [0x100f0574], 0
je 0x1002cabe
cmp dword [0x100f0580], 0
jg 0x1002cade
mov edx, dword [esp + 0x2c]
mov eax, dword [edx + 0x34]
push 0
push 1
push 0xffffffffffffffff
add eax, 0xc0
push 0x100d6138
push eax
call fcn.10039770
add esp, 0x14
cmp dword [0x100f0574], 0
je 0x1002caf0
cmp dword [0x100f0580], 0
jg 0x1002cb11
mov ecx, dword [esp + 0x2c]
mov edx, dword [ecx + 0x34]
push 0
push 1
push 0xffffffffffffffff
push 0x100d613c
add edx, 0x100
push edx
call fcn.10039770
add esp, 0x14
mov eax, dword [esp + 0x2c]
mov ecx, dword [ebx + 0x30]
cmp ecx, 0xf03b7906
jne 0x1002cb33
mov dword [ebx + 0x30], 0xa029a697
test edi, edi
jne 0x1002cb4b
mov ecx, dword [esp + 0x18]
mov dword [ecx], eax
jmp 0x1002cb7a
cmp ecx, 0xa029a697
jne 0x1002cb46
or dword [ebx + 8], 4
mov dword [ebx + 0x30], 0xb5357930
mov edi, 0x15
test eax, eax
je 0x1002cb7a
mov ecx, dword [eax + 0x50]
mov esi, eax
cmp ecx, 0xbdf20da3
je 0x1002cb6e
cmp ecx, 0x519c2973
je 0x1002cb6e
cmp ecx, 0x26bceaa5
je 0x1002cb73
jmp 0x1002cb7a
call fcn.1003b670
mov eax, esi
call fcn.1003b7a0
mov eax, dword [esp + 0x10]
mov ecx, ebx
test eax, eax
je 0x1002cba6
push eax
push 0x100d6140
push edi
call fcn.1002dcd0
mov eax, dword [esp + 0x1c]
add esp, 0xc
test eax, eax
je 0x1002cbb1
push eax
call fcn.1009cc76
add esp, 4
jmp 0x1002cbb1
push 0
push edi
call fcn.1002dcd0
add esp, 8
cmp dword [0x100f0574], 0
mov esi, 1
je 0x1002cbe9
cmp dword [0x100f0580], 0
jle 0x1002cbe9
sub dword [0x100f0580], esi
push 0
push 7
mov ecx, ebx
mov dword [0x100f0574], 0
call fcn.1002dcd0
add esp, 8
lea edi, [esi + 6]
cmp dword [0x100f0584], 0
jne 0x1002cc16
add dword [0x100f0580], esi
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
sub dword [0x100f0580], esi
mov dword [0x100f01dc], eax
cmp eax, 0xffffffff
je 0x1002cc5e
mov dword [0x100f0584], esi
jmp 0x1002cc1b
mov eax, dword [0x100f01dc]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x1002cc5e
mov ecx, 0x100d43a4
mov esi, eax
mov edx, 0xc
sub esi, ecx
mov ebx, dword [esi + ecx]
cmp ebx, dword [ecx]
jne 0x1002cc5e
sub edx, 4
add ecx, 4
cmp edx, 4
jae 0x1002cc34
push eax
call fcn.1009cc76
mov edx, dword [0x100f01dc]
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.1009c0cb
mov esp, ebp
pop ebp
ret