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

Disassembly:
push edi
mov edi, dword [esp + 8]
test edi, edi
jne 0x439b7d
xor eax, eax
pop edi
ret
mov eax, dword [edi + 0x30]
cmp eax, 0x9f3c2d33
je 0x439b9c
cmp eax, 0xa029a697
je 0x439b9c
cmp eax, 0xf03b7906
je 0x439b9c
mov eax, 0x15
pop edi
ret
push ebx
push 0
mov ebx, edi
call fcn.0042ab10
push 0x44
call fcn.00417ef0
mov eax, dword [edi + 0x50]
add esp, 8
test eax, eax
je 0x439bd0
push str.Unable_to_close_due_to_unfinalised_statements
push 5
mov eax, edi
call fcn.0041e3a0
add esp, 8
pop ebx
mov eax, 5
pop edi
ret
cmp dword [edi + 0x30], 0x9f3c2d33
je 0x439bec
mov eax, edi
call fcn.00410750
test eax, eax
je 0x439bec
pop ebx
mov eax, 1
pop edi
ret
mov eax, dword [edi]
push ebp
xor ebp, ebp
test eax, eax
push esi
jle 0x439c33
xor ebx, ebx
jmp 0x439c00
mov esi, dword [edi + 4]
mov eax, dword [esi + ebx + 4]
add esi, ebx
test eax, eax
je 0x439c29
push eax
call fcn.0042eb40
add esp, 4
cmp ebx, 0x18
mov dword [esi + 4], 0
je 0x439c29
mov dword [esi + 0x14], 0
mov eax, dword [edi]
inc ebp
add ebx, 0x18
cmp ebp, eax
jl 0x439c00
push 0
mov ebx, edi
call fcn.0042ab10
mov ebp, dword [edi + 0xe4]
xor ebx, ebx
add esp, 4
cmp ebp, ebx
je 0x439c7a
jmp 0x439c50
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x439c73
jmp 0x439c60
mov esi, dword [eax + 0xc]
push eax
call dword [sym.imp.MSVCR71.dll_free]
add esp, 4
cmp esi, ebx
mov eax, esi
jne 0x439c60
mov ebp, dword [ebp]
cmp ebp, ebx
jne 0x439c50
mov eax, dword [edi + 0x100]
cmp eax, ebx
mov dword [esp + 0x14], eax
je 0x439cd3
jmp 0x439c90
mov eax, dword [esp + 0x14]
mov ebx, dword [eax + 8]
lea esi, [ebx + 0x10]
mov ebp, 3
nop
mov eax, dword [esi]
test eax, eax
je 0x439caf
mov ecx, dword [esi - 8]
push ecx
call eax
add esp, 4
add esi, 0x14
dec ebp
jne 0x439ca0
test ebx, ebx
je 0x439cc3
push ebx
call dword [sym.imp.MSVCR71.dll_free]
add esp, 4
mov edx, dword [esp + 0x14]
mov eax, dword [edx]
test eax, eax
mov dword [esp + 0x14], eax
jne 0x439c90
xor ebx, ebx
lea esi, [edi + 0xf8]
call fcn.004107c0
mov esi, dword [edi + 0xbc]
cmp esi, ebx
je 0x439d0b
mov ebp, dword [esi + 8]
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x439cfb
mov ecx, dword [ebp + 8]
push ecx
call eax
add esp, 4
push ebp
call dword [sym.imp.MSVCR71.dll_free]
mov esi, dword [esi]
add esp, 4
cmp esi, ebx
jne 0x439ce8
mov eax, dword [edi + 0xcc]
cmp eax, ebx
mov esi, dword [edi + 0xbc]
mov dword [edi + 0xbc], ebx
je 0x439d2b
push eax
call dword [edi + 0xc4]
add esp, 4
cmp esi, ebx
mov dword [edi + 0xcc], ebx
mov dword [edi + 0xc8], ebx
je 0x439d6d
jmp 0x439d40
mov al, byte [edi + 0xb5]
test al, al
mov ebp, dword [esi]
je 0x439d5d
mov eax, dword [esi + 0xc]
cmp eax, ebx
je 0x439d5d
push eax
call dword [edi + 0xc4]
add esp, 4
push esi
call dword [edi + 0xc4]
add esp, 4
cmp ebp, ebx
mov esi, ebp
jne 0x439d40
mov dword [edi + 0xb8], ebx
mov eax, dword [edi + 0xf4]
cmp eax, ebx
mov esi, dword [edi + 0xe4]
mov dword [edi + 0xe4], ebx
je 0x439d93
push eax
call dword [edi + 0xec]
add esp, 4
cmp esi, ebx
mov dword [edi + 0xf4], ebx
mov dword [edi + 0xf0], ebx
je 0x439dd0
mov al, byte [edi + 0xdd]
test al, al
mov ebp, dword [esi]
je 0x439dc0
mov eax, dword [esi + 0xc]
cmp eax, ebx
je 0x439dc0
push eax
call dword [edi + 0xec]
add esp, 4
push esi
call dword [edi + 0xec]
add esp, 4
cmp ebp, ebx
mov esi, ebp
jne 0x439da3
push ebx
push ebx
mov eax, edi
mov dword [edi + 0xe0], ebx
call fcn.0041e3a0
mov esi, dword [edi + 0x8c]
add esp, 8
cmp esi, ebx
je 0x439e0a
push esi
call fcn.004171b0
mov ebx, dword [sym.imp.MSVCR71.dll_free]
push esi
mov word [esi + 0x18], 1
mov byte [esi + 0x1a], 5
call ebx
add esp, 8
jmp 0x439e10
mov ebx, dword [sym.imp.MSVCR71.dll_free]
mov eax, dword [edi + 0x48]
xor esi, esi
test eax, eax
jle 0x439e31
mov ebp, dword [sym.imp.KERNEL32.dll_FreeLibrary]
nop
mov edx, dword [edi + 0x4c]
mov eax, dword [edx + esi*4]
push eax
call ebp
mov eax, dword [edi + 0x48]
inc esi
cmp esi, eax
jl 0x439e20
mov eax, dword [edi + 0x4c]
test eax, eax
je 0x439e3e
push eax
call ebx
add esp, 4
mov ecx, dword [edi + 4]
mov dword [edi + 0x30], 0xb5357930
mov eax, dword [ecx + 0x2c]
test eax, eax
je 0x439e55
push eax
call ebx
add esp, 4
push edi
call ebx
mov eax, dword [0x4696fc]
add esp, 4
test eax, eax
jne 0x439ec3
call fcn.00410f50
mov eax, dword [0x4696fc]
test eax, eax
jne 0x439eab
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x4695c0], eax
jne 0x439ea1
mov ecx, dword [0x4696f0]
dec ecx
push 0x4696d0
mov dword [0x4696f0], ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebp
pop ebx
xor eax, eax
pop edi
ret
mov dword [0x4696fc], 1
mov ecx, dword [0x4696f0]
dec ecx
push 0x4696d0
mov dword [0x4696f0], ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edx, dword [0x4695c0]
push edx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x439efa
mov ecx, 3
mov edi, 0x45c9d8
mov esi, eax
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
jne 0x439efa
push eax
call ebx
mov eax, dword [0x4695c0]
add esp, 4
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop esi
pop ebp
pop ebx
xor eax, eax
pop edi
ret