Function at 0x4397e2
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.00439633
and dword [ebp - 0x14], 0
cmp byte [edi], 0x5b
jne 0x439a02
mov eax, edi
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x439810
mov ebx, dword [sym.imp.KERNEL32.DLL_TlsGetValue]
sub eax, ecx
mov dword [ebp - 0xc], eax
cmp byte [0x4c5ce8], dl
je 0x43985f
mov eax, dword [0x4c5cec]
cmp eax, 0xffffffff
je 0x43985f
push eax
call ebx
mov esi, eax
test esi, esi
jne 0x439861
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 0x439861
xor esi, esi
mov eax, dword [ebp - 0xc]
inc eax
mov dword [esi + 0x14], eax
cmp byte [0x4c5ce8], 0
mov esi, dword [0x4c5cec]
je 0x4398af
cmp esi, 0xffffffff
je 0x4398af
push esi
call ebx
mov esi, eax
test esi, esi
jne 0x4398a5
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 0x4398b1
xor eax, eax
mov eax, dword [eax + 0x14]
call section..text
cmp byte [0x4c5ce8], 0
mov dword [ebp - 0xc], esp
je 0x4398f5
cmp esi, 0xffffffff
je 0x4398f5
push esi
call ebx
mov esi, eax
test esi, esi
jne 0x4398f7
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 0x4398f7
xor esi, esi
mov eax, dword [ebp - 0xc]
mov dword [esi + 0x18], eax
cmp byte [0x4c5ce8], 0
mov eax, dword [0x4c5cec]
je 0x439943
cmp eax, 0xffffffff
je 0x439943
push eax
call ebx
mov esi, eax
test esi, esi
jne 0x439939
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 - 0xc], esi
jmp 0x439947
and dword [ebp - 0xc], 0
cmp byte [0x4c5ce8], 0
je 0x439982
cmp eax, 0xffffffff
je 0x439982
push eax
call ebx
mov esi, eax
test esi, esi
jne 0x43997e
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 0x439984
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 0x439b5f
lea eax, [ebp - 0x3c]
mov byte [ebx], 0
lea ecx, [esi + 1]
push eax
lea edx, [ebp - 1]
inc ebx
call fcn.00443915
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 0x439b5f
cmp byte [ebx], 0x3a
jne 0x4399e6
inc ebx
push ebx
call sub.MSVCRT.dll_atoi
pop ecx
movzx eax, ax
jmp 0x4399e9
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 0x439b59
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 0x439a3a
lea edx, [ebp - 1]
mov ecx, edi
call fcn.004438a6
cmp byte [ebp - 1], 0
je 0x439b5f
push esi
push eax
lea ecx, [ebp - 0x3c]
call fcn.0043966e
mov esi, eax
jmp 0x439b57
push 0x3a
push edi
call sub.MSVCRT.dll_strchr
pop ecx
pop ecx
cmp eax, esi
jne 0x439b31
sub esi, edi
lea eax, [esi + 1]
call section..text
cmp byte [0x4c5ce8], 0
mov dword [ebp - 0x14], esp
je 0x439a9b
mov eax, dword [0x4c5cec]
cmp eax, 0xffffffff
je 0x439a9b
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov ebx, eax
test ebx, ebx
jne 0x439a9d
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 [0x4c5cec]
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
jmp 0x439a9d
xor ebx, ebx
mov eax, dword [ebp - 0x14]
mov dword [ebx + 0x18], eax
cmp byte [0x4c5ce8], 0
je 0x439ae7
mov eax, dword [0x4c5cec]
cmp eax, 0xffffffff
je 0x439ae7
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov ebx, eax
test ebx, ebx
jne 0x439ae3
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 [0x4c5cec]
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
mov eax, ebx
jmp 0x439ae9
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.004438a6
cmp byte [ebp - 1], 0
mov esi, eax
je 0x439b5f
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.0043966e
mov esi, eax
jmp 0x4399fa
lea eax, [ebp - 0x3c]
push eax
lea edx, [ebp - 1]
mov ecx, edi
call fcn.00443915
cmp byte [ebp - 1], 0
je 0x439b5f
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 0x439b6b
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