Function at 0x415664
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
push 7
mov esi, ecx
push 0x490e3c
push esi
mov dword [ebp - 0xc], edx
call sub.MSVCRT.dll__strnicmp
add esp, 0xc
test eax, eax
je 0x41568d
xor al, al
jmp 0x41594f
add esi, 7
mov eax, esi
mov dword [ebp - 0x10], esi
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x415698
mov ebx, dword [sym.imp.KERNEL32.DLL_TlsGetValue]
sub eax, ecx
mov dword [ebp - 8], eax
cmp byte [0x4c6d08], dl
je 0x4156e7
mov eax, dword [0x4c6d0c]
cmp eax, 0xffffffff
je 0x4156e7
push eax
call ebx
mov esi, eax
test esi, esi
jne 0x4156e9
push 0x20
call sub.MSVCRT.dll_malloc
pop ecx
push 8
mov esi, eax
pop ecx
xor eax, eax
mov edi, esi
push esi
rep stosd dword es:[edi], eax
push dword [0x4c6d0c]
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
jmp 0x4156e9
xor esi, esi
mov eax, dword [ebp - 8]
inc eax
mov dword [esi + 0x14], eax
cmp byte [0x4c6d08], 0
mov esi, dword [0x4c6d0c]
je 0x415737
cmp esi, 0xffffffff
je 0x415737
push esi
call ebx
mov esi, eax
test esi, esi
jne 0x41572d
push 0x20
call sub.MSVCRT.dll_malloc
pop ecx
push 8
mov esi, eax
pop ecx
xor eax, eax
mov edi, esi
push esi
rep stosd dword es:[edi], eax
push dword [0x4c6d0c]
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
mov eax, esi
mov esi, dword [0x4c6d0c]
jmp 0x415739
xor eax, eax
mov eax, dword [eax + 0x14]
call section..text
cmp byte [0x4c6d08], 0
mov dword [ebp - 8], esp
je 0x41577d
cmp esi, 0xffffffff
je 0x41577d
push esi
call ebx
mov esi, eax
test esi, esi
jne 0x41577f
push 0x20
call sub.MSVCRT.dll_malloc
pop ecx
push 8
mov esi, eax
pop ecx
xor eax, eax
mov edi, esi
push esi
rep stosd dword es:[edi], eax
push dword [0x4c6d0c]
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
jmp 0x41577f
xor esi, esi
mov eax, dword [ebp - 8]
mov dword [esi + 0x18], eax
cmp byte [0x4c6d08], 0
mov eax, dword [0x4c6d0c]
je 0x4157cb
cmp eax, 0xffffffff
je 0x4157cb
push eax
call ebx
mov esi, eax
test esi, esi
jne 0x4157c1
push 0x20
call sub.MSVCRT.dll_malloc
pop ecx
push 8
mov esi, eax
pop ecx
xor eax, eax
mov edi, esi
push esi
rep stosd dword es:[edi], eax
push dword [0x4c6d0c]
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
mov eax, dword [0x4c6d0c]
mov dword [ebp - 8], esi
jmp 0x4157cf
and dword [ebp - 8], 0
cmp byte [0x4c6d08], 0
je 0x41580a
cmp eax, 0xffffffff
je 0x41580a
push eax
call ebx
mov esi, eax
test esi, esi
jne 0x415806
push 0x20
call sub.MSVCRT.dll_malloc
pop ecx
push 8
mov esi, eax
pop ecx
xor eax, eax
mov edi, esi
push esi
rep stosd dword es:[edi], eax
push dword [0x4c6d0c]
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
mov ecx, esi
jmp 0x41580c
xor ecx, ecx
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x14]
mov ecx, dword [ecx + 0x18]
push eax
push dword [ebp - 0x10]
push ecx
call sub.MSVCRT.dll_memcpy
mov ecx, dword [ebp + 8]
add esp, 0xc
mov byte [ebp - 1], 0
test ecx, ecx
je 0x415830
and dword [ecx], 0
mov ebx, dword [ebp + 0xc]
lea edi, [eax + 1]
mov dl, 0x26
mov ecx, edi
call fcn.0043ab8c
mov dl, 0x3d
mov ecx, edi
mov dword [ebp + 0xc], eax
call fcn.0043ab8c
mov ecx, edi
mov esi, eax
call fcn.00443583
test esi, esi
je 0x41585f
mov ecx, esi
call fcn.00443583
push 2
push 0x491fac
push edi
call sub.MSVCRT.dll__strnicmp
add esp, 0xc
test eax, eax
jne 0x4158c5
test esi, esi
je 0x4158c5
push 9
push str.urn:btih:
push esi
call sub.MSVCRT.dll__strnicmp
add esp, 0xc
test eax, eax
jne 0x4158c5
add esi, 9
mov eax, esi
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x415893
sub eax, ecx
cmp eax, 0x20
jne 0x4158b0
mov ecx, dword [ebp - 0xc]
push eax
push esi
push 0x14
pop edx
call fcn.00443050
jmp 0x4158c0
cmp eax, 0x28
jne 0x415933
mov ecx, dword [ebp - 0xc]
push eax
mov edx, esi
call fcn.00414807
mov byte [ebp - 1], al
jmp 0x415933
cmp dword [ebp + 8], 0
je 0x4158f1
push 2
push 0x491f9c
push edi
call sub.MSVCRT.dll__strnicmp
add esp, 0xc
test eax, eax
jne 0x4158f1
test esi, esi
je 0x415933
mov ecx, esi
call fcn.00444c8a
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
jmp 0x415933
test ebx, ebx
je 0x415933
push 2
push 0x491f98
push edi
call sub.MSVCRT.dll__strnicmp
add esp, 0xc
test eax, eax
jne 0x415933
test esi, esi
je 0x415933
mov ecx, esi
call fcn.00444c8a
mov esi, eax
mov eax, dword [ebx + 8]
cmp eax, dword [ebx + 4]
jb 0x415925
mov ecx, ebx
call fcn.0045a5dd
mov eax, dword [ebx + 8]
lea ecx, [eax + 1]
mov dword [ebx + 8], ecx
mov ecx, dword [ebx]
mov dword [ecx + eax*4], esi
mov edi, dword [ebp + 0xc]
test edi, edi
jne 0x415836
cmp byte [ebp - 1], 0
jne 0x41594c
mov ecx, dword [ebp + 8]
call fcn.0043b2e5
mov al, byte [ebp - 1]
lea esp, [ebp - 0x1c]
pop edi
pop esi
pop ebx
leave
ret 8