Function at 0x40ed44
Capabilities:
Allocate thread local storage
Enumerate files on windows
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c4
mov dword [ebp - 0x5c], 0xa8
mov dword [ebp - 0x4c], 0x25
mov dword [ebp - 0xc], 0x2c
mov dword [ebp - 4], 0x5d
mov dword [ebp - 0x38], 0xa7
mov dword [ebp - 0x100], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x10c], 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 0x5c], eax
cmp dword [0x421814], 0x103c2
jne 0x40edb3
mov dword [0x421800], 0x5b
push str.CDvSRGuSl.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x4c], eax
push str.xHGaFI
mov eax, dword [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x5c]
movzx edx, word [ecx]
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x60], eax
cmp dword [ebp - 0x60], 0xc1
ja case.0x40edf9.1
mov ecx, dword [ebp - 0x60]
movzx edx, byte [ecx + 0x40f954]
jmp dword [edx*4 + 0x40f938]
mov eax, dword [ebp - 0x108]
push eax
mov ecx, dword [ebp - 0x100]
push ecx
call dword [sym.imp.OLEAUT32.dll_SafeArrayAllocDescriptor]
mov dword [0x4217f4], eax
mov edx, dword [0x4217f0]
sub edx, dword [ebp - 4]
mov dword [0x4217e0], edx
jmp 0x40ef36
mov dword [ebp - 0x13c], 0x83
mov eax, dword [0x421824]
push eax
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [0x421824]
push edx
mov eax, dword [0x421800]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [0x421820], eax
jmp 0x40ef36
mov ecx, dword [0x421820]
sub ecx, dword [ebp + 8]
mov dword [0x42180c], ecx
mov edx, dword [ebp - 0x140]
push edx
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov dword [0x4217e4], eax
jmp 0x40ef36
mov dword [ebp - 0x144], 0x78
mov eax, dword [0x421824]
push eax
mov ecx, dword [0x4217ec]
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [0x42181c], eax
jmp 0x40ef36
mov dword [ebp - 0x64], 0x60
mov dword [ebp - 0x104], 0
lea edx, [ebp - 0x64]
push edx
push str.cPffgJkJViPm
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0xc], eax
mov dword [ebp + 8], 0
lea eax, [ebp - 0x64]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x40eef2
mov edx, dword [ebp + 8]
add edx, 1
mov dword [ebp + 8], edx
jmp 0x40eed5
mov eax, dword [ebp + 8]
mov dword [ebp - 0x104], eax
mov ecx, dword [0x421814]
push ecx
call fcn.0040bf94
add esp, 4
jmp 0x40ef36
mov dword [ebp - 0x148], 0x23
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [ebp - 0x108], eax
jmp 0x40ef36
mov edx, dword [0x4217f8]
add edx, dword [0x4217e4]
mov dword [0x4217e8], edx
mov eax, dword [ebp - 0x10c]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
je 0x40efa0
cmp dword [ebp - 0x3c], 0x6b
je 0x40ef5d
cmp dword [ebp - 0x3c], 0x8b
je 0x40efeb
jmp 0x40f022
mov dword [ebp - 0x14c], 0x46
mov ecx, dword [0x421808]
push ecx
mov edx, dword [ebp - 4]
push edx
mov eax, dword [0x421800]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.USER32.dll_CallNextHookEx]
mov dword [ebp - 4], eax
mov edx, dword [0x4217e0]
mov dword [0x42180c], edx
mov eax, dword [0x42180c]
mov dword [0x4217e0], eax
jmp 0x40f050
mov dword [ebp - 0x150], 0x54
mov dword [ebp - 0x110], 0x8b
mov dword [ebp - 0x68], 0x3b
mov dword [ebp - 0x44], 0x15
mov dword [ebp - 0x40], 0
mov ecx, dword [ebp - 0x110]
add ecx, dword [ebp - 0x40]
mov dword [ebp - 0x68], ecx
mov eax, dword [ebp - 0x44]
xor edx, edx
div dword [ebp - 0x68]
mov dword [ebp - 0x40], eax
mov edx, dword [ebp - 0x44]
or edx, dword [ebp - 0x40]
mov dword [ebp - 0x44], edx
jmp 0x40f050
mov dword [ebp - 0x114], 0xc7
mov eax, dword [0x4217fc]
push eax
mov ecx, dword [0x4217e8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x42180c], eax
mov edx, dword [ebp - 0x154]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov dword [ebp - 0x114], eax
jmp 0x40f050
mov eax, dword [0x42181c]
xor eax, dword [0x42181c]
mov dword [0x4217f0], eax
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp - 0xc]
mov dword [0x4217e0], ecx
mov edx, dword [str.AJ]
and edx, dword [0x421808]
mov dword [0x421808], edx
mov dword [ebp - 0x20], 0x47
jmp 0x40f062