Function at 0x40f743
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x128
push esi
mov dword [ebp - 0x34], 0x6f
mov dword [ebp - 0x20], 0xa9
mov dword [ebp - 8], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0xa4], 0x4d
mov dword [ebp - 0x9c], 0
mov dword [ebp - 0x1c], 0
mov eax, dword [ebp - 0xc]
or eax, dword [0x41c130]
mov ecx, dword [0x41c12c]
add ecx, dword [ebp + 0xc]
cmp eax, ecx
jbe 0x40f7a3
mov dword [ebp - 0x3c], 1
jmp 0x40f7aa
mov dword [ebp - 0x3c], 0
cmp dword [ebp - 0x3c], 0
jne 0x40f7e0
mov edx, dword [ebp - 0x1c]
sub edx, dword [ebp - 0x9c]
mov eax, dword [ebp - 0x30]
sub eax, dword [ebp - 0xa4]
cmp edx, eax
je 0x40f7cf
mov dword [ebp - 0x40], 1
jmp 0x40f7d6
mov dword [ebp - 0x40], 0
cmp dword [ebp - 0x40], 0
je 0x40fa9e
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x2c], 0x29
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x54], 0xda
mov ecx, dword [ebp - 0x10]
add ecx, dword [ebp - 0x64]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x18]
imul edx, dword [ebp - 0x24]
mov eax, dword [0x41c0c8]
or eax, dword [ebp - 0x28]
cmp edx, eax
jae 0x40f828
mov dword [ebp - 0x44], 1
jmp 0x40f82f
mov dword [ebp - 0x44], 0
cmp dword [ebp - 0x44], 0
je 0x40f870
mov ecx, dword [0x41c11c]
xor ecx, dword [ebp - 0xd8]
je 0x40f85a
mov edx, dword [ebp - 0x18]
imul edx, dword [0x41c128]
test edx, edx
je 0x40f85a
mov dword [ebp - 0x48], 1
jmp 0x40f861
mov dword [ebp - 0x48], 0
cmp dword [ebp - 0x48], 0
je 0x40f870
mov dword [ebp - 0x4c], 1
jmp 0x40f877
mov dword [ebp - 0x4c], 0
cmp dword [ebp - 0x4c], 0
je 0x40f8e7
mov ecx, dword [ebp - 0x14]
add ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
xor edx, edx
div dword [ebp - 0x2c]
cmp ecx, eax
jae 0x40f898
mov dword [ebp - 0x50], 1
jmp 0x40f89f
mov dword [ebp - 0x50], 0
cmp dword [ebp - 0x50], 0
je 0x40f8e7
mov dword [ebp - 0xdc], 0xb4
mov dword [ebp - 0xe0], 0xc5
mov edx, dword [ebp - 0xc]
push edx
call fcn.0040cca3
add esp, 4
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.USER32.dll_UnhookWindowsHookEx]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x54]
push ecx
mov edx, dword [ebp - 0x54]
push edx
call dword [sym.imp.ole32.dll_CoTreatAsClass]
mov dword [0x41c0d0], eax
jmp 0x40f93e
mov dword [ebp - 0xb8], 0xf
mov dword [ebp - 0xc0], 0x68
mov dword [ebp - 0xe4], 0
mov dword [ebp - 0xe8], 0
mov dword [ebp - 0xbc], 0
mov eax, dword [ebp - 0xb8]
sub eax, dword [ebp - 0xbc]
mov dword [ebp - 0xc0], eax
mov ecx, dword [0x41c12c]
push ecx
mov edx, dword [ebp - 0x18]
push edx
call fcn.0040d5a3
add esp, 8
mov eax, dword [ebp - 0x38]
imul eax, dword [0x41c118]
mov ecx, dword [0x41c124]
add ecx, dword [ebp - 8]
cmp eax, ecx
jae 0x40f95e
mov dword [ebp - 0x58], 1
jmp 0x40f965
mov dword [ebp - 0x58], 0
cmp dword [ebp - 0x58], 0
jne 0x40f9a3
mov edx, dword [0x41c0d4]
or edx, dword [0x41c11c]
jne 0x40f98d
mov eax, dword [ebp - 8]
xor eax, dword [0x41c0c0]
jne 0x40f98d
mov dword [ebp - 0x5c], 0
jmp 0x40f994
mov dword [ebp - 0x5c], 1
cmp dword [ebp - 0x5c], 0
jne 0x40f9a3
mov dword [ebp - 0x60], 0
jmp 0x40f9aa
mov dword [ebp - 0x60], 1
cmp dword [ebp - 0x60], 0
jne 0x40f9e8
mov ecx, dword [ebp - 0x64]
add ecx, dword [0x41c130]
jne 0x40f9d2
mov edx, dword [0x41c118]
add edx, dword [str.p4vH_]
jne 0x40f9d2
mov dword [ebp - 0x68], 0
jmp 0x40f9d9
mov dword [ebp - 0x68], 1
cmp dword [ebp - 0x68], 0
jne 0x40f9e8
mov dword [ebp - 0x6c], 0
jmp 0x40f9ef
mov dword [ebp - 0x6c], 1
cmp dword [ebp - 0x6c], 0
jne 0x40fa1b
mov eax, dword [ebp - 0x14]
sub eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x2c]
xor ecx, dword [ebp - 0x2c]
cmp eax, ecx
jne 0x40fa0e
mov dword [ebp - 0x70], 1
jmp 0x40fa15
mov dword [ebp - 0x70], 0
cmp dword [ebp - 0x70], 0
je 0x40fa5d
mov dword [ebp - 0xec], 0x53
mov dword [ebp - 0xf0], 0x13
mov dword [ebp - 4], 0
push fcn.0040d5a3
mov edx, dword [ebp - 0x34]
push edx
call fcn.0040b613
add esp, 8
mov eax, dword [ebp - 4]
or eax, dword [ebp - 4]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp - 4]
mov dword [ebp - 4], ecx
jmp 0x40fa9e
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [0x41c12c], eax
mov eax, dword [0x41c124]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOverridePredefKey]
mov dword [0x41c12c], eax
push fcn.0040cca3
mov edx, dword [0x41c12c]
push edx
mov eax, dword [ebp - 0x24]
push eax
call fcn.00413893
add esp, 0xc
jmp 0x40f784
mov ecx, dword [ebp - 0xf4]
sub ecx, dword [0x41c130]
je 0x40fabd
mov edx, dword [ebp - 0x34]
xor edx, dword [ebp - 0x38]
je 0x40fabd
mov dword [ebp - 0x74], 1
jmp 0x40fac4
mov dword [ebp - 0x74], 0
cmp dword [ebp - 0x74], 0
je 0x40fafe
mov eax, dword [0x41c118]
sub eax, dword [0x41c0d8]
je 0x40fae8
mov ecx, dword [ebp - 0x24]
add ecx, dword [ebp - 8]
je 0x40fae8
mov dword [ebp - 0x78], 1
jmp 0x40faef
mov dword [ebp - 0x78], 0
cmp dword [ebp - 0x78], 0
je 0x40fafe
mov dword [ebp - 0x7c], 1
jmp 0x40fb05
mov dword [ebp - 0x7c], 0
cmp dword [ebp - 0x7c], 0
je 0x40fed4
mov edx, dword [ebp - 8]
sub edx, dword [ebp - 0x30]
je 0x40fb28
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0x1c]
je 0x40fb28
mov dword [ebp - 0x80], 1
jmp 0x40fb2f
mov dword [ebp - 0x80], 0
cmp dword [ebp - 0x80], 0
je 0x40fed4
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x20]
mov dword [0x41c11c], edx
mov eax, dword [ebp - 0xcc]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [0x41c11c], eax
je 0x40fb69
mov dword [ebp - 0x84], 1
jmp 0x40fb73
mov dword [ebp - 0x84], 0
mov ecx, dword [0x41c0c8]
sub ecx, dword [ebp - 0xf8]
mov dword [0x41c110], ecx
mov edx, dword [0x41c128]
push edx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [0x41c110], eax
jbe 0x40fba6
mov dword [ebp - 0x88], 1
jmp 0x40fbb0
mov dword [ebp - 0x88], 0
mov eax, dword [ebp - 0x84]
cmp eax, dword [ebp - 0x88]
jne 0x40fbca
mov dword [ebp - 0x8c], 1
jmp 0x40fbd4
mov dword [ebp - 0x8c], 0
cmp dword [ebp - 0x8c], 0
jne 0x40fc2e
mov esi, dword [0x41c0d4]
xor esi, dword [0x41c0c4]
mov ecx, dword [0x41c11c]
push ecx
mov edx, dword [0x41c110]
push edx
call fcn.00412f53
add esp, 8
cmp esi, eax
jae 0x40fc0f
mov dword [ebp - 0x90], 1
jmp 0x40fc19
mov dword [ebp - 0x90], 0
cmp dword [ebp - 0x90], 0
jne 0x40fc2e
mov dword [ebp - 0x94], 0
jmp 0x40fc38
mov dword [ebp - 0x94], 1
cmp dword [ebp - 0x94], 0
je 0x40fca1
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
test eax, eax
jne 0x40fc72
push fcn.0040ab83
mov eax, dword [0x41c0c0]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00409c73
add esp, 0xc
test eax, eax
jne 0x40fc72
mov dword [ebp - 0x98], 0
jmp 0x40fc7c
mov dword [ebp - 0x98], 1
cmp dword [ebp - 0x98], 0
je 0x40fca1
mov dword [ebp - 0xfc], 0x77
mov edx, dword [0x41c130]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov dword [ebp - 0x20], eax
jmp 0x40fce3
mov dword [ebp - 0x100], 0xcb
mov dword [ebp - 0x104], 0x87
mov dword [ebp - 0x108], 0x5a
mov eax, dword [0x41c0bc]
push eax
mov ecx, dword [0x41c128]
push ecx
call fcn.00410403
add esp, 8
mov edx, dword [ebp - 0x9c]
xor edx, dword [ebp - 0x18]
mov dword [0x41c0d4], edx
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov dword [0x41c0cc], eax
mov ecx, dword [0x41c120]
push ecx
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov edx, dword [0x41c124]
imul edx, dword [ebp - 0x18]
cmp eax, edx
jae 0x40fd3b
mov dword [ebp - 0x10c], 0xcf
mov eax, dword [0x41c0d8]
xor edx, edx
div dword [ebp - 0xc]
mov dword [0x41c0c4], eax
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.ole32.dll_CoTreatAsClass]
mov dword [0x41c0cc], eax
jmp 0x40fd7e
mov dword [ebp - 0x110], 0xd3
mov edx, dword [ebp - 0x38]
push edx
mov eax, dword [0x41c0c8]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x28], eax
mov ecx, dword [0x41c110]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov dword [ebp - 0x30], eax
mov edx, dword [ebp - 8]
push edx
mov eax, dword [0x41c0cc]
push eax
call dword [sym.imp.GDI32.dll_SetArcDirection]
mov dword [ebp - 0xc4], eax
mov ecx, dword [ebp - 0xc4]
and ecx, dword [0x41c0d0]
mov dword [ebp - 0x28], ecx
mov eax, dword [0x41c0c4]
xor edx, edx
div dword [ebp - 0x34]
mov dword [ebp - 0x24], eax
mov edx, dword [ebp - 0x28]
cmp edx, dword [ebp - 0x24]
jbe 0x40fdae
mov dword [ebp - 0xa0], 1
jmp 0x40fdb8
mov dword [ebp - 0xa0], 0
cmp dword [ebp - 0xa0], 0
je 0x40fe26
mov eax, dword [0x41c0d4]
push eax
mov ecx, dword [0x41c130]
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x40fe07
mov edx, dword [0x41c124]
push edx
mov eax, dword [ebp - 0xa4]
push eax
mov ecx, dword [0x41c118]
push ecx
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test eax, eax
jne 0x40fe07
mov dword [ebp - 0xa8], 0
jmp 0x40fe11
mov dword [ebp - 0xa8], 1
cmp dword [ebp - 0xa8], 0
je 0x40fe26
mov dword [ebp - 0xac], 1
jmp 0x40fe30
mov dword [ebp - 0xac], 0
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 0x18]
mov dword [0x41c0c4], eax
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, dword [0x41c0c4]
jbe 0x40fe55
mov dword [ebp - 0xb0], 1
jmp 0x40fe5f
mov dword [ebp - 0xb0], 0
mov ecx, dword [ebp - 0xac]
cmp ecx, dword [ebp - 0xb0]
jne 0x40fe96
mov dword [ebp - 0x114], 0xce
mov dword [ebp - 0xc8], 0x71
mov edx, dword [ebp - 0xc8]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov dword [ebp - 0xcc], eax
jmp 0x40febd
mov dword [ebp - 0x118], 0x27
mov eax, dword [ebp - 0x28]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
mov dword [0x41c124], ecx
mov edx, dword [0x41c110]
sub edx, dword [ebp + 0xc]
mov dword [ebp + 0xc], edx
mov eax, dword [0x41c11c]
push eax
mov ecx, dword [ebp - 0x38]
push ecx
call dword [sym.imp.ole32.dll_CoTreatAsClass]
mov dword [0x41c12c], eax
jmp 0x40ff42
mov dword [ebp - 0x11c], 0x26
mov dword [ebp - 0x120], 0xea
mov dword [ebp - 0x124], 0x6d
mov dword [ebp - 0x128], 0x3a
mov dword [ebp - 0xd4], 0xc2
mov dword [ebp - 0xd0], 0x99
mov dword [ebp - 0xb4], 0
push fcn.0040b613
mov edx, dword [ebp - 0xb4]
push edx
call fcn.0040ab83
add esp, 8
mov eax, dword [ebp - 0xb4]
xor edx, edx
div dword [ebp - 0xd0]
mov dword [ebp - 0xd4], eax
mov eax, dword [ebp - 0x1c]
xor eax, dword [ebp - 0x1c]
pop esi
mov esp, ebp
pop ebp
ret