Function at 0x4156b1
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 0x48fe3c
push esi
mov dword [ebp - 0xc], edx
call sub.MSVCRT.dll__strnicmp
add esp, 0xc
test eax, eax
je 0x4156da
xor al, al
jmp 0x41599c
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 0x4156e5
mov ebx, dword [sym.imp.KERNEL32.DLL_TlsGetValue]
sub eax, ecx
mov dword [ebp - 8], eax
cmp byte [0x4c5ce8], dl
je 0x415734
mov eax, dword [0x4c5cec]
cmp eax, 0xffffffff
je 0x415734
push eax
call ebx
mov esi, eax
test esi, esi
jne 0x415736
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 [0x4c5cec]
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
jmp 0x415736
xor esi, esi
mov eax, dword [ebp - 8]
inc eax
mov dword [esi + 0x14], eax
cmp byte [0x4c5ce8], 0
mov esi, dword [0x4c5cec]
je 0x415784
cmp esi, 0xffffffff
je 0x415784
push esi
call ebx
mov esi, eax
test esi, esi
jne 0x41577a
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 [0x4c5cec]
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
mov eax, esi
mov esi, dword [0x4c5cec]
jmp 0x415786
xor eax, eax
mov eax, dword [eax + 0x14]
call section..text
cmp byte [0x4c5ce8], 0
mov dword [ebp - 8], esp
je 0x4157ca
cmp esi, 0xffffffff
je 0x4157ca
push esi
call ebx
mov esi, eax
test esi, esi
jne 0x4157cc
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 [0x4c5cec]
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
jmp 0x4157cc
xor esi, esi
mov eax, dword [ebp - 8]
mov dword [esi + 0x18], eax
cmp byte [0x4c5ce8], 0
mov eax, dword [0x4c5cec]
je 0x415818
cmp eax, 0xffffffff
je 0x415818
push eax
call ebx
mov esi, eax
test esi, esi
jne 0x41580e
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 [0x4c5cec]
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
mov eax, dword [0x4c5cec]
mov dword [ebp - 8], esi
jmp 0x41581c
and dword [ebp - 8], 0
cmp byte [0x4c5ce8], 0
je 0x415857
cmp eax, 0xffffffff
je 0x415857
push eax
call ebx
mov esi, eax
test esi, esi
jne 0x415853
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 [0x4c5cec]
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
mov ecx, esi
jmp 0x415859
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 0x41587d
and dword [ecx], 0
mov ebx, dword [ebp + 0xc]
lea edi, [eax + 1]
mov dl, 0x26
mov ecx, edi
call fcn.0043ab6b
mov dl, 0x3d
mov ecx, edi
mov dword [ebp + 0xc], eax
call fcn.0043ab6b
mov ecx, edi
mov esi, eax
call fcn.004435d8
test esi, esi
je 0x4158ac
mov ecx, esi
call fcn.004435d8
push 2
push 0x490fac
push edi
call sub.MSVCRT.dll__strnicmp
add esp, 0xc
test eax, eax
jne 0x415912
test esi, esi
je 0x415912
push 9
push str.urn:btih:
push esi
call sub.MSVCRT.dll__strnicmp
add esp, 0xc
test eax, eax
jne 0x415912
add esi, 9
mov eax, esi
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4158e0
sub eax, ecx
cmp eax, 0x20
jne 0x4158fd
mov ecx, dword [ebp - 0xc]
push eax
push esi
push 0x14
pop edx
call fcn.004430a5
jmp 0x41590d
cmp eax, 0x28
jne 0x415980
mov ecx, dword [ebp - 0xc]
push eax
mov edx, esi
call fcn.00414855
mov byte [ebp - 1], al
jmp 0x415980
cmp dword [ebp + 8], 0
je 0x41593e
push 2
push 0x490f9c
push edi
call sub.MSVCRT.dll__strnicmp
add esp, 0xc
test eax, eax
jne 0x41593e
test esi, esi
je 0x415980
mov ecx, esi
call fcn.00444cdf
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
jmp 0x415980
test ebx, ebx
je 0x415980
push 2
push 0x490f98
push edi
call sub.MSVCRT.dll__strnicmp
add esp, 0xc
test eax, eax
jne 0x415980
test esi, esi
je 0x415980
mov ecx, esi
call fcn.00444cdf
mov esi, eax
mov eax, dword [ebx + 8]
cmp eax, dword [ebx + 4]
jb 0x415972
mov ecx, ebx
call fcn.00449d1b
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 0x415883
cmp byte [ebp - 1], 0
jne 0x415999
mov ecx, dword [ebp + 8]
call fcn.0043b2c4
mov al, byte [ebp - 1]
lea esp, [ebp - 0x1c]
pop edi
pop esi
pop ebx
leave
ret 8