Function at 0x40bbc0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2c
mov eax, dword [0x5c7004]
xor eax, esp
mov dword [esp + 0x28], eax
movzx eax, word [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 8]
sub eax, 9
je 0x40c019
sub eax, 1
je 0x40be9c
sub eax, 1
jne 0x40c0fb
mov dword [esp + 0xc], eax
lea eax, [esp + 0xc]
push eax
push edi
call sym.ProcessHacker.exe_PhParseCommandLinePart
test eax, eax
je 0x40c0fb
lea ecx, ds:[eax - 8]
or eax, 0xffffffff
lock xadd dword [ecx + 4], eax
dec eax
jne 0x40bc28
call fcn.004c1f60
mov edx, dword [edi]
mov ecx, dword [esp + 0xc]
shr edx, 1
cmp ecx, edx
jae 0x40bc52
mov eax, dword [edi + 4]
lea eax, [eax + ecx*2]
lea ebx, [ebx]
cmp word [eax], 0x20
jne 0x40bc4e
inc ecx
add eax, 2
cmp ecx, edx
jb 0x40bc40
mov dword [esp + 0xc], ecx
lea eax, [esp + 0xc]
push eax
push edi
call sym.ProcessHacker.exe_PhParseCommandLinePart
mov edi, eax
test edi, edi
je 0x40c0fb
push edi
call sym.ProcessHacker.exe_PhAutoDereferenceObject
mov eax, dword [edi]
push dword [0x5cd4f8]
mov ecx, dword [edi + 4]
mov dword [esp + 0x10], eax
add eax, 0xa
push eax
mov dword [esp + 0x18], ecx
call sym.ProcessHacker.exe_PhCreateObject
mov ebx, eax
xor edx, edx
mov eax, dword [esp + 0xc]
lea ecx, [ebx + 8]
mov dword [ebx + 4], ecx
mov dword [ebx], eax
mov word [ecx + eax], dx
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x40bcb3
push eax
push ecx
push dword [ebx + 4]
call fcn.00537fe0
add esp, 0xc
push dword [ebx + 4]
call fcn.00538fe5
add esp, 4
mov dword [esp + 0x10], 0x16
lea eax, [esp + 0x10]
mov dword [esp + 0x14], str._PROCESSID:
push 0
push eax
push edi
call sym.ProcessHacker.exe_PhFindStringInStringRef
jmp 0x40bce0
cmp eax, 0xffffffff
je 0x40c0fb
mov ecx, dword [edi]
push dword [0x5cd4f8]
shr ecx, 1
sub ecx, eax
lea ebx, [ecx*2 - 0x16]
mov ecx, dword [edi + 4]
add ecx, 0x16
lea eax, [ecx + eax*2]
mov dword [esp + 0x14], eax
lea eax, [ebx + 0xa]
push eax
call sym.ProcessHacker.exe_PhCreateObject
mov edi, eax
xor eax, eax
lea ecx, [edi + 8]
mov dword [edi], ebx
mov dword [edi + 4], ecx
mov word [ecx + ebx], ax
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40bd37
push ebx
push eax
push dword [edi + 4]
call fcn.00537fe0
add esp, 0xc
push edi
call sym.ProcessHacker.exe_PhAutoDereferenceObject
mov edi, eax
lea eax, [esp + 0x24]
push eax
push edi
call sym.ProcessHacker.exe_PhStringToGuid
test eax, eax
js 0x40c0fb
lfence
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
mov dword [esi], ecx
mov dword [esi + 4], eax
mov eax, dword [esp + 0x2c]
mov dword [esi + 8], eax
mov eax, dword [esp + 0x30]
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
push dword [edi + 4]
push str.CLSID_
call sym.ProcessHacker.exe_PhConcatStrings2
push eax
call sym.ProcessHacker.exe_PhAutoDereferenceObject
push 0
push eax
push 0xfffffffffffffff9
push 0x20019
lea eax, [esp + 0x28]
push eax
call sym.ProcessHacker.exe_PhOpenKey
test eax, eax
js 0x40be31
push 0
push dword [esp + 0x1c]
call sym.ProcessHacker.exe_PhQueryRegistryString
push eax
call sym.ProcessHacker.exe_PhAutoDereferenceObject
push 0
push 0x5c9578
push dword [esp + 0x20]
mov dword [esi + 0x10], eax
lea eax, [esp + 0x28]
push 0x20019
push eax
call sym.ProcessHacker.exe_PhOpenKey
test eax, eax
js 0x40be11
push 0
push dword [esp + 0x20]
call sym.ProcessHacker.exe_PhQueryRegistryString
push eax
call sym.ProcessHacker.exe_PhAutoDereferenceObject
push eax
mov dword [esi + 0x14], eax
call sym.ProcessHacker.exe_PhExpandEnvironmentStrings
push eax
call sym.ProcessHacker.exe_PhAutoDereferenceObject
nop
test eax, eax
je 0x40be07
mov dword [esi + 0x14], eax
push dword [esp + 0x1c]
call dword [sym.imp.ntdll.dll_NtClose]
push dword [esp + 0x18]
call dword [sym.imp.ntdll.dll_NtClose]
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.00534c91
mov esp, ebp
pop ebp
ret 0xc
lfence
push dword [edi + 4]
push str.AppID_
call sym.ProcessHacker.exe_PhConcatStrings2
push eax
call sym.ProcessHacker.exe_PhAutoDereferenceObject
push 0
push eax
push 0xfffffffffffffff9
push 0x20019
lea eax, [esp + 0x28]
push eax
call sym.ProcessHacker.exe_PhOpenKey
nop
test eax, eax
js 0x40c003
push 0
push dword [esp + 0x1c]
call sym.ProcessHacker.exe_PhQueryRegistryString
push eax
call sym.ProcessHacker.exe_PhAutoDereferenceObject
push dword [esp + 0x18]
mov dword [esi + 0x10], eax
call dword [sym.imp.ntdll.dll_NtClose]
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.00534c91
mov esp, ebp
pop ebp
ret 0xc
lea eax, [esp + 0xc]
mov dword [esp + 0xc], 0
push eax
push edi
call sym.ProcessHacker.exe_PhParseCommandLinePart
test eax, eax
je 0x40c0fb
lea ecx, [eax - 8]
or eax, 0xffffffff
lock xadd dword [ecx + 4], eax
dec eax
jne 0x40beca
call fcn.004c1f60
mov edx, dword [edi]
mov ecx, dword [esp + 0xc]
shr edx, 1
cmp ecx, edx
jae 0x40bef2
mov eax, dword [edi + 4]
lea eax, [eax + ecx*2]
lea esp, [esp]
cmp word [eax], 0x20
jne 0x40beee
inc ecx
add eax, 2
cmp ecx, edx
jb 0x40bee0
mov dword [esp + 0xc], ecx
lea eax, [esp + 0xc]
push eax
push edi
call sym.ProcessHacker.exe_PhParseCommandLinePart
mov edi, eax
test edi, edi
je 0x40c0fb
push edi
call sym.ProcessHacker.exe_PhAutoDereferenceObject
lea eax, ds:[esp + 0x1c]
push eax
lea eax, [esp + 0x14]
push eax
push 0x2c
push edi
call sym.ProcessHacker.exe_PhSplitStringRefAtLastChar
test al, al
je 0x40c0fb
mov ebx, dword [esp + 0x10]
test ebx, ebx
jne 0x40bf3e
call sym.ProcessHacker.exe_PhReferenceEmptyString
mov edi, eax
jmp 0x40bf72
push dword [0x5cd4f8]
lea eax, [ebx + 0xa]
push eax
call sym.ProcessHacker.exe_PhCreateObject
mov edi, eax
xor ecx, ecx
lea eax, [edi + 8]
mov dword [edi + 4], eax
mov dword [edi], ebx
mov word [eax + ebx], cx
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40bf72
push ebx
push eax
push dword [edi + 4]
call fcn.00537fe0
add esp, 0xc
push edi
call sym.ProcessHacker.exe_PhAutoDereferenceObject
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x10], eax
test ebx, ebx
jne 0x40bf8d
call sym.ProcessHacker.exe_PhReferenceEmptyString
mov edi, eax
jmp 0x40bfc1
push dword [0x5cd4f8]
lea eax, [ebx + 0xa]
push eax
call sym.ProcessHacker.exe_PhCreateObject
mov edi, eax
xor ecx, ecx
lea eax, [edi + 8]
mov dword [edi + 4], eax
mov dword [edi], ebx
mov word [eax + ebx], cx
mov eax, dword [esp + 0x20]
test eax, eax
je 0x40bfc1
push ebx
push eax
push dword [edi + 4]
call fcn.00537fe0
add esp, 0xc
push edi
call sym.ProcessHacker.exe_PhAutoDereferenceObject
mov ebx, dword [esp + 0x10]
mov edi, eax
push dword [ebx + 4]
call dword [sym.imp.ntdll.dll_RtlDetermineDosPathNameType_U]
cmp eax, 5
jne 0x40bffe
push dword [ebx + 4]
push 0x562d24
call sym.ProcessHacker.exe_PhGetSystemDirectory
push eax
call sym.ProcessHacker.exe_PhAutoDereferenceObject
mov eax, dword [eax + 4]
push eax
push 3
call fcn.00401570
add esp, 0x10
mov ebx, eax
mov dword [esi], ebx
mov dword [esi + 4], edi
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.00534c91
mov esp, ebp
pop ebp
ret 0xc
push esi
push 0x40bb60
push 1
push 1
push 0x5c9588
push edi
mov dword [esi], 0
call sym.ProcessHacker.exe_PhParseCommandLine
mov edi, dword [esi]
test edi, edi
je 0x40c0fb
push dword [0x5cf03c]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
mov eax, dword [esi]
cmp eax, 0x40
jae 0x40c06f
mov dword [esi + eax*4 + 4], edi
mov al, 1
inc dword [esi]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.00534c91
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [esi + 0x10c]
test ecx, ecx
jne 0x40c09e
push 0x100
push 4
push dword [0x5cd55c]
mov dword [esi + 0x108], 0x40
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov dword [esi + 0x10c], eax
mov ecx, eax
mov eax, dword [esi + 0x104]
mov edx, dword [esi + 0x108]
cmp eax, edx
jne 0x40c0dc
lea eax, [edx + edx]
mov dword [esi + 0x108], eax
shl eax, 2
push eax
push ecx
push 4
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlReAllocateHeap]
mov dword [esi + 0x10c], eax
mov eax, dword [esi + 0x104]
mov ecx, dword [esi + 0x10c]
mov dword [ecx + eax*4], edi
mov al, 1
inc dword [esi + 0x104]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.00534c91
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [esp + 0x34]
xor al, al
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00534c91
mov esp, ebp
pop ebp
ret 0xc