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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push ecx
push ebx
push esi
mov esi, eax
xor ebx, ebx
push edi
cmp esi, ebx
je 0x10017ada
mov eax, dword [esi + 0x30]
cmp eax, 0x9f3c2d33
je 0x100177f8
cmp eax, 0xa029a697
je 0x100177f8
cmp eax, 0xf03b7906
je 0x100177f8
lea eax, [ebx + 0x15]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x48], ebx
je 0x1001781a
push str.Unable_to_close_due_to_unfinalised_statements
push 5
mov ecx, esi
call fcn.1001a310
add esp, 8
mov eax, 5
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 0x9f3c2d33
je 0x10017838
mov eax, esi
call fcn.1001ab90
test eax, eax
je 0x10017838
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi], ebx
jle 0x10017874
mov dword [esp + 0xc], ebx
mov edi, dword [esi + 4]
add edi, dword [esp + 0xc]
mov eax, dword [edi + 4]
test eax, eax
je 0x1001786a
push eax
call fcn.1001c470
add esp, 4
mov dword [edi + 4], 0
cmp ebx, 1
je 0x1001786a
mov dword [edi + 0x14], 0
add dword [esp + 0xc], 0x18
inc ebx
cmp ebx, dword [esi]
jl 0x10017840
push 0
mov ebx, esi
call fcn.1002a390
mov ebx, dword [esi + 0xb0]
add esp, 4
test ebx, ebx
je 0x100178af
lea ebx, [ebx]
mov eax, dword [ebx + 8]
test eax, eax
je 0x100178a9
mov edi, dword [eax + 0xc]
push eax
call fcn.100b3828
add esp, 4
mov eax, edi
test edi, edi
jne 0x10017897
mov ebx, dword [ebx]
test ebx, ebx
jne 0x10017890
mov edi, dword [esi + 0xcc]
test edi, edi
je 0x100178d6
lea esp, [esp]
mov eax, dword [edi + 8]
test eax, eax
je 0x100178d0
push eax
call fcn.100b3828
add esp, 4
mov edi, dword [edi]
test edi, edi
jne 0x100178c0
mov eax, dword [esi + 0xdc]
mov edi, dword [esi + 0xcc]
mov dword [esi + 0xcc], 0
test eax, eax
je 0x100178fc
push eax
mov eax, dword [esi + 0xd4]
call eax
add esp, 4
xor eax, eax
mov dword [esi + 0xdc], eax
mov dword [esi + 0xd8], eax
cmp edi, eax
je 0x10017940
mov edi, edi
cmp byte [esi + 0xc5], 0
mov ebx, dword [edi]
je 0x1001792e
mov eax, dword [edi + 0xc]
test eax, eax
je 0x1001792e
mov ecx, dword [esi + 0xd4]
push eax
call ecx
add esp, 4
mov edx, dword [esi + 0xd4]
push edi
call edx
add esp, 4
mov edi, ebx
test ebx, ebx
jne 0x10017910
xor ecx, ecx
mov dword [esi + 0xc8], ecx
mov eax, dword [esi + 0xc0]
mov edi, dword [esi + 0xb0]
mov dword [esi + 0xb0], ecx
cmp eax, ecx
je 0x1001796a
push eax
mov eax, dword [esi + 0xb8]
call eax
add esp, 4
xor eax, eax
mov dword [esi + 0xc0], eax
mov dword [esi + 0xbc], eax
cmp edi, eax
je 0x100179b0
lea esp, [esp]
cmp byte [esi + 0xa9], 0
mov ebx, dword [edi]
je 0x1001799e
mov eax, dword [edi + 0xc]
test eax, eax
je 0x1001799e
mov ecx, dword [esi + 0xb8]
push eax
call ecx
add esp, 4
mov edx, dword [esi + 0xb8]
push edi
call edx
add esp, 4
mov edi, ebx
test ebx, ebx
jne 0x10017980
push 0
push 0
mov ecx, esi
mov dword [esi + 0xac], 0
call fcn.1001a310
mov edi, dword [esi + 0x84]
add esp, 8
test edi, edi
je 0x10017a38
movzx ecx, word [edi + 0x18]
test ecx, 0x440
je 0x10017a1e
mov eax, dword [edi + 0x1c]
test eax, eax
je 0x10017a06
test ecx, 0x400
je 0x100179fe
mov ecx, dword [edi]
mov ebx, edi
call fcn.10025820
push edi
call fcn.100258c0
jmp 0x10017a13
mov ecx, dword [edi + 0x10]
push ecx
call eax
jmp 0x10017a13
mov eax, dword [edi + 0x10]
test eax, eax
je 0x10017a16
push eax
call fcn.100b3828
add esp, 4
xor eax, eax
mov dword [edi + 0x10], eax
mov dword [edi + 0x1c], eax
mov ebx, 1
mov edx, ebx
push edi
mov word [edi + 0x18], dx
mov byte [edi + 0x1a], 5
call fcn.100b3828
add esp, 4
jmp 0x10017a3d
mov ebx, 1
mov eax, dword [esi + 4]
mov dword [esi + 0x30], 0xb5357930
mov eax, dword [eax + 0x2c]
test eax, eax
je 0x10017a57
push eax
call fcn.100b3828
add esp, 4
push esi
call fcn.100b3828
add esp, 4
cmp dword [0x10112c74], 0
jne 0x10017a8d
add dword [0x10112c70], ebx
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
sub dword [0x10112c70], ebx
mov dword [0x101128cc], eax
cmp eax, 0xffffffff
je 0x10017ada
mov dword [0x10112c74], ebx
jmp 0x10017a92
mov eax, dword [0x101128cc]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x10017ada
mov ecx, 0x100f0274
mov esi, eax
mov edx, 0xc
sub esi, ecx
jmp 0x10017ab0
mov edi, dword [esi + ecx]
cmp edi, dword [ecx]
jne 0x10017ada
sub edx, 4
add ecx, 4
cmp edx, 4
jae 0x10017ab0
push eax
call fcn.100b3828
mov ecx, dword [0x101128cc]
add esp, 4
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret