Function at 0x40f050
Capabilities:
Get thread local storage value
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x45beda
mov eax, dword fs:[0]
push eax
sub esp, 0x98
push ebx
push ebp
push esi
push edi
mov eax, dword [0x473354]
xor eax, esp
push eax
lea eax, [esp + 0xac]
mov dword fs:[0], eax
push 1
call fcn.0042f396
mov dword [esp + 0x30], eax
mov byte [eax], 0
xor edi, edi
push 1
mov dword [esp + 0xbc], edi
call fcn.0042f396
mov dword [esp + 0x54], eax
mov byte [eax], 0
push 1
call fcn.0042f396
mov dword [esp + 0x64], eax
mov byte [eax], 0
push 1
call fcn.0042f396
mov dword [esp + 0x6c], eax
mov byte [eax], 0
push 1
call fcn.0042f396
add esp, 0x14
mov dword [esp + 0x54], eax
mov byte [eax], 0
mov byte [esp + 0xb4], 4
cmp dword [0x474d7c], edi
je 0x40f2ac
cmp dword [esp + 0xc8], 0xffffffff
jne 0x40f2ac
push 0x46043c
call fcn.0042f484
mov dword [esp + 0x3c], eax
push 0x46043c
call fcn.0042f484
mov dword [esp + 0x44], eax
push 0x46043c
call fcn.0042f484
mov dword [esp + 0x40], eax
push 0x46043c
call fcn.0042f484
mov dword [esp + 0x28], eax
push 0x46043c
call fcn.0042f484
mov dword [esp + 0x30], eax
push 0x46043c
call fcn.0042f484
mov dword [esp + 0x38], eax
push 0x46043c
call fcn.0042f484
add esp, 0x1c
mov dword [esp + 0x24], eax
mov ebx, dword [esp + 0xc4]
mov eax, ebx
cmp ebx, edi
jne 0x40f168
mov eax, 0x46043c
push eax
call fcn.0042f484
mov ebp, eax
mov dword [esp + 0x34], ebp
push 0x46043c
call fcn.0042f484
add esp, 8
mov dword [esp + 0x28], eax
mov eax, ebx
cmp ebx, edi
jne 0x40f190
mov eax, 0x46043c
push eax
call fcn.0042f484
mov esi, eax
mov dword [esp + 0x44], esi
mov edx, dword [esp + 0xc4]
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x38]
push ecx
push edx
lea eax, [esp + 0x60]
push eax
call fcn.00407af0
mov edi, eax
mov eax, dword [esp + 0xd4]
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x58]
push edx
push eax
lea ecx, [esp + 0x64]
push ecx
call fcn.00407af0
movzx ecx, byte [esp + 0xf0]
push 0xffffffffffffffff
push 0
push 0
lea edx, [esp + 0x68]
push edx
push ecx
lea edx, [esp + 0x74]
push edx
lea ecx, [esp + 0x70]
push ecx
lea edx, [esp + 0x58]
push edx
lea ecx, [esp + 0x60]
push ecx
lea edx, [esp + 0x68]
push edx
push edi
push eax
mov eax, dword [esp + 0x110]
push 0
push 0xffffffffffffffff
push 0
push eax
mov byte [esp + 0x118], 0x10
call fcn.0040c0f0
mov ecx, dword [esp + 0xa8]
add esp, 0x64
push ecx
mov dword [esp + 0xcc], eax
call fcn.0042f4d9
mov edx, dword [esp + 0x54]
push edx
call fcn.0042f4d9
push esi
call fcn.0042f4d9
mov eax, dword [esp + 0x34]
push eax
call fcn.0042f4d9
push ebp
call fcn.0042f4d9
mov ecx, dword [esp + 0x38]
push ecx
call fcn.0042f4d9
mov edx, dword [esp + 0x38]
push edx
call fcn.0042f4d9
mov eax, dword [esp + 0x38]
push eax
call fcn.0042f4d9
mov ecx, dword [esp + 0x38]
push ecx
call fcn.0042f4d9
mov edx, dword [esp + 0x58]
push edx
call fcn.0042f4d9
mov eax, dword [esp + 0x64]
push eax
call fcn.0042f4d9
mov ecx, dword [esp + 0x64]
push ecx
mov byte [esp + 0xe4], 4
call fcn.0042f4d9
add esp, 0x30
xor edi, edi
jmp 0x40f2b3
mov ebx, dword [esp + 0xc4]
mov eax, dword [0x4746a8]
lea edx, [esp + 0x80]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [esp + 0xc4]
or eax, 0x20019
push eax
push edi
push ebx
push ecx
call fcn.00409f10
add esp, 0x14
test eax, eax
jne 0x40f9d0
mov dword [esp + 0x28], edi
jmp 0x40f2f0
push 1
call fcn.0042f396
mov dword [esp + 0x1c], eax
mov byte [eax], 0
push 1
call fcn.0042f396
mov dword [esp + 0x24], eax
mov byte [eax], 0
push 1
call fcn.0042f396
mov esi, eax
mov dword [esp + 0x30], esi
mov byte [esi], 0
push 1
call fcn.0042f396
mov dword [esp + 0x74], eax
mov byte [eax], 0
push 4
mov byte [esp + 0xc8], 0x14
call fcn.0042ff00
add esp, 0x14
cmp eax, edi
je 0x40f348
lea edx, [esp + 0x68]
mov dword [eax], edx
jmp 0x40f34a
xor eax, eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x74], edi
mov dword [esp + 0x78], edi
mov dword [esp + 0x7c], edi
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x80]
lea eax, [esp + 0x1c]
push eax
push ecx
push edx
mov byte [esp + 0xc0], 0x16
call fcn.00416b90
add esp, 0xc
test eax, eax
jne 0x40f953
lea eax, [esp + 0x1c]
push eax
mov eax, str.CLSID_
lea ecx, [esp + 0x98]
call fcn.00406910
push eax
mov eax, 0x46155c
lea ecx, [esp + 0xac]
call fcn.004068d0
mov eax, dword [eax]
mov edi, dword [esp + 0x20]
push eax
call fcn.0042f484
push edi
mov dword [esp + 0x28], eax
call fcn.0042f4d9
mov ecx, dword [esp + 0xb4]
push ecx
call fcn.0042f4d9
mov edx, dword [esp + 0xa8]
push edx
call fcn.0042f4d9
lea eax, [esp + 0x34]
push eax
mov eax, str.HKCRCLSID_
lea ecx, [esp + 0xa0]
call fcn.00406910
mov eax, dword [eax]
mov edi, dword [esp + 0x70]
push eax
call fcn.0042f484
push edi
mov dword [esp + 0x78], eax
call fcn.0042f4d9
mov ecx, dword [esp + 0xa8]
push ecx
call fcn.0042f4d9
mov eax, dword [0x4746a8]
mov edi, dword [esp + 0x40]
add esp, 0x28
lea edx, [esp + 0x20]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
or eax, 0x20019
push eax
push 0
push edi
push SysReAllocString
call fcn.00409f10
add esp, 0x14
test eax, eax
jne 0x40f90e
mov edx, dword [esp + 0x20]
lea ecx, [esp + 0x18]
push ecx
push eax
push eax
push 0x46043c
push edx
call fcn.00416ab0
add esp, 0x14
test eax, eax
jne 0x40f8be
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x64]
push eax
push ecx
call fcn.0040ef90
push 0
lea edx, [esp + 0x70]
push edx
lea eax, [esp + 0xb8]
push eax
call fcn.0040b350
mov eax, dword [eax]
push eax
call fcn.0042f484
mov ebx, eax
push esi
mov dword [esp + 0x40], ebx
call fcn.0042f4d9
mov ecx, dword [esp + 0xc4]
push ecx
call fcn.0042f4d9
mov edx, dword [esp + 0x40]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add esp, 0x20
push edx
call ebp
mov edx, dword [esp + 0xbc]
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x50]
push ecx
push ebx
push edx
call fcn.0040b950
push str.CLSID_
mov dword [esp + 0xac], eax
call fcn.0042f484
mov edi, eax
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x48]
lea esi, [esp + 0xa4]
mov dword [esp + 0x48], edi
call fcn.004068a0
mov eax, dword [eax]
mov esi, dword [esp + 0x30]
push eax
call fcn.0042f484
push esi
mov dword [esp + 0x38], eax
call fcn.0042f4d9
mov ecx, dword [esp + 0xac]
push ecx
call fcn.0042f4d9
push edi
call fcn.0042f4d9
mov edx, dword [esp + 0x44]
mov esi, dword [esp + 0x54]
push edx
call fcn.0042f484
mov edi, eax
push esi
mov dword [esp + 0x5c], edi
call fcn.0042f4d9
mov ecx, dword [0x4746a8]
mov esi, dword [esp + 0x48]
add esp, 0x30
lea eax, [esp + 0x20]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
or eax, 0x20019
push eax
push 0
push esi
push SysReAllocString
call fcn.00409f10
add esp, 0x14
test eax, eax
jne 0x40f5c5
lea edx, [esp + 0x18]
push edx
push eax
push eax
mov eax, dword [esp + 0x2c]
push 0x46043c
push eax
call fcn.00416ab0
add esp, 0x14
test eax, eax
jne 0x40f5be
mov edx, dword [esp + 0x18]
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40f5a0
sub eax, esi
je 0x40f5be
push edx
call fcn.0042f484
push edi
mov dword [esp + 0x34], eax
call fcn.0042f4d9
add esp, 8
mov ecx, dword [esp + 0x20]
push ecx
call ebp
lea edx, [esp + 0x5c]
push edx
lea eax, [esp + 0x50]
push eax
mov eax, dword [esp + 0xc4]
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x38]
push edx
push eax
call fcn.0040bd70
add esp, 0x14
test al, al
je 0x40f89e
cmp dword [esp + 0xc8], 0xffffffff
jne 0x40f7cb
push 0x46043c
call fcn.0042f484
mov dword [esp + 0x34], eax
push 0x46043c
call fcn.0042f484
mov dword [esp + 0x48], eax
push 0x46043c
call fcn.0042f484
mov dword [esp + 0x50], eax
push 0x46043c
call fcn.0042f484
mov dword [esp + 0x60], eax
push 0x46043c
call fcn.0042f484
mov dword [esp + 0x48], eax
push 0x46043c
call fcn.0042f484
mov dword [esp + 0x54], eax
push 0x46043c
call fcn.0042f484
add esp, 0x1c
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0xc4]
test eax, eax
jne 0x40f674
mov eax, 0x46043c
push eax
call fcn.0042f484
mov ebp, eax
mov dword [esp + 0xa0], ebp
push 0x46043c
call fcn.0042f484
mov ebx, eax
add esp, 8
mov dword [esp + 0x60], ebx
mov eax, dword [esp + 0xc4]
test eax, eax
jne 0x40f6a6
mov eax, 0x46043c
push eax
call fcn.0042f484
mov esi, eax
mov dword [esp + 0x4c], esi
mov eax, dword [esp + 0xc4]
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0xa4]
push edx
push eax
lea ecx, [esp + 0xa0]
push ecx
call fcn.00407af0
mov edi, eax
mov ecx, dword [esp + 0xd4]
lea edx, [esp + 0x74]
push edx
lea eax, [esp + 0x60]
push eax
push ecx
lea edx, [esp + 0xa8]
push edx
call fcn.00407af0
movzx edx, byte [esp + 0xf0]
push 0xffffffffffffffff
push 0
push 0
lea ecx, [esp + 0x60]
push ecx
push edx
lea ecx, [esp + 0x78]
push ecx
lea edx, [esp + 0x80]
push edx
lea ecx, [esp + 0x90]
push ecx
lea edx, [esp + 0x78]
push edx
mov edx, dword [esp + 0x104]
lea ecx, [esp + 0x84]
push ecx
push edi
push eax
push 0
push 0xffffffffffffffff
push 0
push edx
mov byte [esp + 0x118], 0x22
call fcn.0040c0f0
mov dword [esp + 0x12c], eax
mov eax, dword [esp + 0xec]
add esp, 0x64
push eax
call fcn.0042f4d9
mov ecx, dword [esp + 0x94]
push ecx
call fcn.0042f4d9
push esi
call fcn.0042f4d9
push ebx
call fcn.0042f4d9
push ebp
call fcn.0042f4d9
mov edx, dword [esp + 0x4c]
push edx
call fcn.0042f4d9
mov eax, dword [esp + 0x54]
push eax
call fcn.0042f4d9
mov ecx, dword [esp + 0x50]
push ecx
call fcn.0042f4d9
mov edx, dword [esp + 0x70]
push edx
call fcn.0042f4d9
mov eax, dword [esp + 0x68]
push eax
call fcn.0042f4d9
mov ecx, dword [esp + 0x68]
push ecx
call fcn.0042f4d9
mov edx, dword [esp + 0x5c]
push edx
call fcn.0042f4d9
mov ebx, dword [esp + 0x54]
add esp, 0x30
push 0x46043c
call fcn.0042f484
mov edi, eax
add esp, 4
mov dword [esp + 0x60], edi
mov eax, dword [esp + 0xc4]
test eax, eax
jne 0x40f7ee
mov eax, 0x46043c
push eax
call fcn.0042f484
mov esi, eax
mov dword [esp + 0x4c], esi
mov edx, dword [esp + 0xc4]
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x50]
push ecx
push edx
lea eax, [esp + 0xb0]
push eax
call fcn.00407af0
movzx edx, byte [esp + 0xe0]
push 0xffffffffffffffff
push 0
push 0
lea ecx, [esp + 0x80]
push ecx
push edx
lea ecx, [esp + 0x7c]
push ecx
lea edx, [esp + 0x88]
push edx
lea ecx, [esp + 0x88]
push ecx
lea edx, [esp + 0x80]
push edx
lea ecx, [esp + 0x5c]
push ecx
mov ecx, dword [esp + 0xd4]
push eax
mov eax, dword [esp + 0x108]
lea edx, [esp + 0x6c]
push edx
mov edx, dword [esp + 0x100]
push 3
push eax
push ecx
push edx
mov byte [esp + 0x108], 0x25
call fcn.0040c0f0
mov eax, dword [esp + 0xf4]
add esp, 0x54
push eax
call fcn.0042f4d9
push esi
call fcn.0042f4d9
push edi
call fcn.0042f4d9
add esp, 0xc
lea ecx, [esp + 0x68]
call fcn.00402070
mov ecx, dword [esp + 0x68]
push ecx
call fcn.0042f2c2
mov edx, dword [esp + 0x68]
push edx
call fcn.0042f4d9
push ebx
jmp 0x40f92c
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x68]
call fcn.00402070
mov eax, dword [esp + 0x68]
push eax
call fcn.0042f2c2
mov ecx, dword [esp + 0x68]
push ecx
call fcn.0042f4d9
push esi
call fcn.0042f4d9
mov edx, dword [esp + 0x28]
push edx
call fcn.0042f4d9
mov eax, dword [esp + 0x28]
push eax
call fcn.0042f4d9
inc dword [esp + 0x3c]
add esp, 0x14
xor edi, edi
jmp 0x40f2f0
lea ecx, [esp + 0x68]
call fcn.00402070
mov ecx, dword [esp + 0x68]
push ecx
call fcn.0042f2c2
mov edx, dword [esp + 0x68]
push edx
call fcn.0042f4d9
push esi
call fcn.0042f4d9
mov eax, dword [esp + 0x28]
push eax
call fcn.0042f4d9
mov ecx, dword [esp + 0x28]
push ecx
call fcn.0042f4d9
inc dword [esp + 0x3c]
add esp, 0x14
xor edi, edi
jmp 0x40f2f0
mov ebx, dword [esp + 0x74]
cmp ebx, edi
je 0x40f982
mov ebp, dword [esp + 0x78]
cmp ebx, ebp
je 0x40f979
mov edx, dword [ebx]
push edx
call fcn.0042f4d9
add ebx, 4
add esp, 4
cmp ebx, ebp
jne 0x40f963
mov ebx, dword [esp + 0x74]
push ebx
call fcn.0042f2c2
add esp, 4
mov eax, dword [esp + 0x68]
push eax
mov dword [esp + 0x78], edi
mov dword [esp + 0x7c], edi
mov dword [esp + 0x80], edi
call fcn.0042f2c2
mov ecx, dword [esp + 0x68]
push ecx
call fcn.0042f4d9
push esi
call fcn.0042f4d9
mov edx, dword [esp + 0x28]
push edx
call fcn.0042f4d9
mov eax, dword [esp + 0x28]
push eax
call fcn.0042f4d9
mov ecx, dword [esp + 0x94]
add esp, 0x14
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [esp + 0x54]
push edx
call fcn.0042f4d9
mov eax, dword [esp + 0x60]
push eax
call fcn.0042f4d9
mov ecx, dword [esp + 0x60]
push ecx
call fcn.0042f4d9
mov edx, dword [esp + 0x58]
push edx
call fcn.0042f4d9
mov eax, dword [esp + 0x3c]
push eax
call fcn.0042f4d9
mov eax, dword [esp + 0xdc]
add esp, 0x14
mov ecx, dword [esp + 0xac]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa4
ret