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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
push esi
push edi
mov edi, edx
mov ebx, ecx
mov dword [ebp - 0x10], edi
mov dword [ebp - 8], ebx
mov byte [ebp - 1], 0
call fcn.00439699
and dword [ebp - 0x14], 0
cmp byte [edi], 0x5b
jne 0x439a68
mov eax, edi
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x439876
mov ebx, dword [sym.imp.KERNEL32.DLL_TlsGetValue]
sub eax, ecx
mov dword [ebp - 0xc], eax
cmp byte [0x4c6ce8], dl
je 0x4398c5
mov eax, dword [0x4c6cec]
cmp eax, 0xffffffff
je 0x4398c5
push eax
call ebx
mov esi, eax
test esi, esi
jne 0x4398c7
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 [0x4c6cec]
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
jmp 0x4398c7
xor esi, esi
mov eax, dword [ebp - 0xc]
inc eax
mov dword [esi + 0x14], eax
cmp byte [0x4c6ce8], 0
mov esi, dword [0x4c6cec]
je 0x439915
cmp esi, 0xffffffff
je 0x439915
push esi
call ebx
mov esi, eax
test esi, esi
jne 0x43990b
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 [0x4c6cec]
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
mov eax, esi
mov esi, dword [0x4c6cec]
jmp 0x439917
xor eax, eax
mov eax, dword [eax + 0x14]
call section..text
cmp byte [0x4c6ce8], 0
mov dword [ebp - 0xc], esp
je 0x43995b
cmp esi, 0xffffffff
je 0x43995b
push esi
call ebx
mov esi, eax
test esi, esi
jne 0x43995d
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 [0x4c6cec]
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
jmp 0x43995d
xor esi, esi
mov eax, dword [ebp - 0xc]
mov dword [esi + 0x18], eax
cmp byte [0x4c6ce8], 0
mov eax, dword [0x4c6cec]
je 0x4399a9
cmp eax, 0xffffffff
je 0x4399a9
push eax
call ebx
mov esi, eax
test esi, esi
jne 0x43999f
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 [0x4c6cec]
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
mov eax, dword [0x4c6cec]
mov dword [ebp - 0xc], esi
jmp 0x4399ad
and dword [ebp - 0xc], 0
cmp byte [0x4c6ce8], 0
je 0x4399e8
cmp eax, 0xffffffff
je 0x4399e8
push eax
call ebx
mov esi, eax
test esi, esi
jne 0x4399e4
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 [0x4c6cec]
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
mov ecx, esi
jmp 0x4399ea
xor ecx, ecx
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x14]
mov ecx, dword [ecx + 0x18]
push eax
push dword [ebp - 0x10]
push ecx
call sub.MSVCRT.dll_memcpy
mov esi, eax
push 0x5d
push esi
call sub.MSVCRT.dll_strrchr
mov ebx, eax
add esp, 0x14
test ebx, ebx
je 0x439bc5
lea eax, [ebp - 0x3c]
mov byte [ebx], 0
lea ecx, [esi + 1]
push eax
lea edx, [ebp - 1]
inc ebx
call fcn.004438f2
cmp byte [ebp - 1], 0
mov esi, eax
lea edi, [ebp - 0x28]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
je 0x439bc5
cmp byte [ebx], 0x3a
jne 0x439a4c
inc ebx
push ebx
call sub.MSVCRT.dll_atoi
pop ecx
movzx eax, ax
jmp 0x439a4f
mov eax, dword [ebp - 0x14]
lea esi, [ebp - 0x28]
lea edi, [ebp - 0x3c]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov word [ebp - 0x2c], ax
lea esi, [ebp - 0x3c]
mov edi, dword [ebp - 8]
jmp 0x439bbf
push 0x3a
push edi
call sub.MSVCRT.dll_strrchr
mov esi, eax
pop ecx
pop ecx
mov dword [ebp - 0xc], esi
test esi, esi
jne 0x439aa0
lea edx, [ebp - 1]
mov ecx, edi
call fcn.00443883
cmp byte [ebp - 1], 0
je 0x439bc5
push esi
push eax
lea ecx, [ebp - 0x3c]
call fcn.004396d4
mov esi, eax
jmp 0x439bbd
push 0x3a
push edi
call sub.MSVCRT.dll_strchr
pop ecx
pop ecx
cmp eax, esi
jne 0x439b97
sub esi, edi
lea eax, [esi + 1]
call section..text
cmp byte [0x4c6ce8], 0
mov dword [ebp - 0x14], esp
je 0x439b01
mov eax, dword [0x4c6cec]
cmp eax, 0xffffffff
je 0x439b01
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov ebx, eax
test ebx, ebx
jne 0x439b03
push 0x20
call sub.MSVCRT.dll_malloc
pop ecx
push 8
mov ebx, eax
pop ecx
xor eax, eax
mov edi, ebx
push ebx
rep stosd dword es:[edi], eax
push dword [0x4c6cec]
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
jmp 0x439b03
xor ebx, ebx
mov eax, dword [ebp - 0x14]
mov dword [ebx + 0x18], eax
cmp byte [0x4c6ce8], 0
je 0x439b4d
mov eax, dword [0x4c6cec]
cmp eax, 0xffffffff
je 0x439b4d
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov ebx, eax
test ebx, ebx
jne 0x439b49
push 0x20
call sub.MSVCRT.dll_malloc
pop ecx
push 8
mov ebx, eax
pop ecx
xor eax, eax
mov edi, ebx
push ebx
rep stosd dword es:[edi], eax
push dword [0x4c6cec]
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
mov eax, ebx
jmp 0x439b4f
xor eax, eax
mov eax, dword [eax + 0x18]
lea ecx, [esi + 1]
push ecx
push dword [ebp - 0x10]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
lea edx, [ebp - 1]
mov ecx, eax
mov byte [eax + esi], 0
call fcn.00443883
cmp byte [ebp - 1], 0
mov esi, eax
je 0x439bc5
mov eax, dword [ebp - 0xc]
inc eax
push eax
call sub.MSVCRT.dll_atoi
pop ecx
movzx eax, ax
push eax
push esi
lea ecx, [ebp - 0x3c]
call fcn.004396d4
mov esi, eax
jmp 0x439a60
lea eax, [ebp - 0x3c]
push eax
lea edx, [ebp - 1]
mov ecx, edi
call fcn.004438f2
cmp byte [ebp - 1], 0
je 0x439bc5
mov esi, eax
lea edi, [ebp - 0x28]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
xor eax, eax
mov word [ebp - 0x18], ax
lea esi, [ebp - 0x28]
mov edi, ebx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov eax, dword [ebp + 8]
test eax, eax
je 0x439bd1
mov cl, byte [ebp - 1]
mov byte [eax], cl
mov eax, dword [ebp - 8]
lea esp, [ebp - 0x48]
pop edi
pop esi
pop ebx
leave
ret 4