Function at 0x415c70
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 0x415f8a
mov eax, dword [esi + 0x30]
cmp eax, 0x9f3c2d33
je 0x415ca8
cmp eax, 0xa029a697
je 0x415ca8
cmp eax, 0xf03b7906
je 0x415ca8
lea eax, [ebx + 0x15]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x48], ebx
je 0x415cca
push str.Unable_to_close_due_to_unfinalised_statements
push 5
mov ecx, esi
call fcn.004186f0
add esp, 8
mov eax, 5
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 0x9f3c2d33
je 0x415ce8
mov eax, esi
call fcn.00418f70
test eax, eax
je 0x415ce8
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi], ebx
jle 0x415d24
mov dword [esp + 0xc], ebx
mov edi, dword [esi + 4]
add edi, dword [esp + 0xc]
mov eax, dword [edi + 4]
test eax, eax
je 0x415d1a
push eax
call fcn.0041a850
add esp, 4
mov dword [edi + 4], 0
cmp ebx, 1
je 0x415d1a
mov dword [edi + 0x14], 0
add dword [esp + 0xc], 0x18
inc ebx
cmp ebx, dword [esi]
jl 0x415cf0
push 0
mov ebx, esi
call fcn.00428770
mov ebx, dword [esi + 0xb0]
add esp, 4
test ebx, ebx
je 0x415d5f
lea ebx, [ebx]
mov eax, dword [ebx + 8]
test eax, eax
je 0x415d59
mov edi, dword [eax + 0xc]
push eax
call fcn.0047c501
add esp, 4
mov eax, edi
test edi, edi
jne 0x415d47
mov ebx, dword [ebx]
test ebx, ebx
jne 0x415d40
mov edi, dword [esi + 0xcc]
test edi, edi
je 0x415d86
lea esp, [esp]
mov eax, dword [edi + 8]
test eax, eax
je 0x415d80
push eax
call fcn.0047c501
add esp, 4
mov edi, dword [edi]
test edi, edi
jne 0x415d70
mov eax, dword [esi + 0xdc]
mov edi, dword [esi + 0xcc]
mov dword [esi + 0xcc], 0
test eax, eax
je 0x415dac
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 0x415df0
mov edi, edi
cmp byte [esi + 0xc5], 0
mov ebx, dword [edi]
je 0x415dde
mov eax, dword [edi + 0xc]
test eax, eax
je 0x415dde
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 0x415dc0
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 0x415e1a
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 0x415e60
lea esp, [esp]
cmp byte [esi + 0xa9], 0
mov ebx, dword [edi]
je 0x415e4e
mov eax, dword [edi + 0xc]
test eax, eax
je 0x415e4e
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 0x415e30
push 0
push 0
mov ecx, esi
mov dword [esi + 0xac], 0
call fcn.004186f0
mov edi, dword [esi + 0x84]
add esp, 8
test edi, edi
je 0x415ee8
movzx ecx, word [edi + 0x18]
test ecx, 0x440
je 0x415ece
mov eax, dword [edi + 0x1c]
test eax, eax
je 0x415eb6
test ecx, 0x400
je 0x415eae
mov ecx, dword [edi]
mov ebx, edi
call fcn.00423c00
push edi
call fcn.00423ca0
jmp 0x415ec3
mov ecx, dword [edi + 0x10]
push ecx
call eax
jmp 0x415ec3
mov eax, dword [edi + 0x10]
test eax, eax
je 0x415ec6
push eax
call fcn.0047c501
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.0047c501
add esp, 4
jmp 0x415eed
mov ebx, 1
mov eax, dword [esi + 4]
mov dword [esi + 0x30], 0xb5357930
mov eax, dword [eax + 0x2c]
test eax, eax
je 0x415f07
push eax
call fcn.0047c501
add esp, 4
push esi
call fcn.0047c501
add esp, 4
cmp dword [0x4c3c48], 0
jne 0x415f3d
add dword [0x4c3c44], ebx
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
sub dword [0x4c3c44], ebx
mov dword [0x4c38a4], eax
cmp eax, 0xffffffff
je 0x415f8a
mov dword [0x4c3c48], ebx
jmp 0x415f42
mov eax, dword [0x4c38a4]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x415f8a
mov ecx, 0x4ad1d4
mov esi, eax
mov edx, 0xc
sub esi, ecx
jmp 0x415f60
mov edi, dword [esi + ecx]
cmp edi, dword [ecx]
jne 0x415f8a
sub edx, 4
add ecx, 4
cmp edx, 4
jae 0x415f60
push eax
call fcn.0047c501
mov ecx, dword [0x4c38a4]
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