Function at 0x41553a
Capabilities:
Set global application hook
Set thread local storage value

Disassembly:
sub esp, 0x1c
push ebx
push ebp
push esi
push edi
mov ebp, ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push 0
push 0x415362
push 3
call dword [sym.imp.USER32.dll_SetWindowsHookExW]
push 0xec
call dword [sym.imp.msvcrt.dll_malloc]
mov ebx, dword [esp + 0x34]
pop ecx
test eax, eax
je 0x41557e
push dword [ebx + 0xc]
mov ecx, eax
push dword [ebx + 8]
call fcn.00412aab
mov edi, eax
jmp 0x415580
xor edi, edi
mov esi, edi
test edi, edi
je 0x41558f
lea eax, [edi + 0x18]
mov ecx, dword [eax]
push eax
call dword [ecx + 4]
push edi
push dword [ebp + 0x30]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push ecx
mov ecx, edi
call fcn.00412d6c
test al, al
je 0x41570c
cmp dword [ebx + 0x20], 0
je 0x4155c4
push dword [ebx + 0x20]
push dword [edi + 0x54]
push 0x44da18
call dword [sym.imp.ole32.dll_CoMarshalInterThreadInterfaceInStream]
and dword [ebx + 0x20], 0
cmp dword [ebx + 0x24], 0
je 0x415609
push dword [ebx + 0x24]
push 1
push 0
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
test eax, eax
js 0x415609
mov eax, dword [ebx + 0x24]
push 0
push 0
push 1
push dword [edi + 0x54]
push 0x44da18
push dword [eax]
call dword [sym.imp.ole32.dll_CoMarshalInterface]
test eax, eax
jns 0x415609
mov eax, dword [ebx + 0x24]
mov eax, dword [eax]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebx + 0x24]
and dword [eax], 0
push edi
push ebx
mov ecx, ebp
call fcn.004153b1
push dword [ebx + 0x1c]
call dword [sym.imp.KERNEL32.dll_SetEvent]
and dword [ebx + 0x1c], 0
mov ecx, dword [edi + 0x54]
test ecx, ecx
je 0x415631
mov eax, dword [ecx]
push 0xffffffffffffffff
push ecx
call dword [eax + 0xf8]
push 0
push 0
push 0
jmp 0x4156ef
mov eax, dword [esp + 0x10]
mov byte [esp + 0x30], 0
cmp eax, dword [edi + 0xd8]
jne 0x4156ac
mov ecx, dword [esp + 0x14]
lea eax, [ecx - 0x100]
cmp eax, 9
ja 0x41566a
lea eax, [esp + 0x10]
mov ecx, edi
push eax
call fcn.00412e32
jmp 0x415691
cmp ecx, 0x200
jb 0x41567a
cmp ecx, 0x20e
jbe 0x415685
lea eax, [ecx - 0x240]
cmp eax, 0xf
ja 0x415695
lea eax, [esp + 0x10]
mov ecx, edi
push eax
call fcn.00412fe1
mov byte [esp + 0x30], al
mov ecx, dword [edi + 0xc4]
lea eax, [esp + 0x10]
push eax
call fcn.00415a3a
cmp byte [esp + 0x30], 0
jne 0x4156ea
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
mov ecx, dword [esp + 0x10]
cmp ecx, dword [edi + 0xd8]
jne 0x4156ea
test eax, eax
jne 0x4156ea
cmp dword [esp + 0x14], 0x102
jne 0x4156ea
cmp dword [esp + 0x18], 9
jne 0x4156ea
mov ecx, edi
call fcn.00413395
xor eax, eax
push eax
push eax
push eax
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.USER32.dll_GetMessageW]
test eax, eax
jne 0x41563c
push ebx
mov ecx, ebp
call fcn.00415471
jmp 0x415719
push dword [ebx + 0x1c]
call dword [sym.imp.KERNEL32.dll_SetEvent]
and dword [ebx + 0x1c], 0
xor ebx, ebx
push ebx
call dword [sym.imp.USER32.dll_UnhookWindowsHookEx]
test edi, edi
je 0x415731
lea eax, [edi + 0x18]
mov esi, ebx
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
push ebx
push dword [ebp + 0x30]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push ebx
push ebx
push dword [ebp + 0x3c]
push dword [ebp + 0x34]
call dword [sym.imp.USER32.dll_PostThreadMessageW]
test esi, esi
je 0x415756
add esi, 0x18
push esi
mov eax, dword [esi]
call dword [eax + 8]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 4