Function at 0x472820
Capabilities:
Get thread local storage value
Log keystrokes
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa4
mov dword [ebp - 0xc], edi
mov dword [ebp - 8], esi
mov dword [ebp - 4], ebx
mov eax, dword [0x440ffd4]
test eax, eax
je 0x472afb
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov esi, eax
test esi, esi
je 0x472ae8
push dword [0x4caff8]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
test ebx, ebx
je 0x47295d
test ebx, ebx
je 0x472a84
mov eax, dword [ebx]
cmp eax, 0xffffffff
je 0x472949
push 0
call fcn.0047307c
pop ecx
mov edx, dword [ebx]
cmp edx, 0x400
jl 0x472898
mov eax, dword [0x44d4c50]
add eax, 0x400
cmp edx, eax
jle 0x4728a4
mov ebx, dword [ebp - 4]
mov esi, dword [ebp - 8]
xor eax, eax
mov esp, ebp
pop ebp
ret
mov eax, dword [0x4caf64]
push 0
push dword [eax + edx*4 - 0x1000]
call dword [sym.imp.USER32.dll_GetWindowLongA]
mov ebx, eax
mov eax, dword [ebx + 0x184]
cmp eax, 1
je 0x472898
mov eax, dword [ebx + 0x180]
test eax, eax
jne 0x47293a
lea esi, [ebp - 0x96]
mov eax, 0xffffffff
mov word [ebp - 0xa4], ax
mov word [ebp - 0xa2], ax
mov word [ebp - 0xa0], ax
mov word [ebp - 0x9e], ax
mov edi, 0x4c2a24
mov word [ebp - 0x9c], ax
mov dword [ebp - 0x9a], eax
mov dl, byte [edi]
add edi, 1
mov byte [esi], dl
add esi, 1
test dl, dl
jne 0x472908
lea eax, [ebp - 0xa4]
push ebx
push eax
call fcn.00474198
add esp, 8
test eax, eax
jne 0x47293a
lea eax, [ebp - 0xa4]
push ebx
push eax
call fcn.00474198
add esp, 8
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
mov eax, ebx
mov ebx, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
push 0xffffffffffffffff
call fcn.0047307c
pop ecx
mov ebx, dword [ebp - 4]
mov esi, dword [ebp - 8]
xor eax, eax
mov esp, ebp
pop ebp
ret
push dword [0x440ffd4]
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x4cb004]
cmp esi, eax
je 0x472a10
push 1
push eax
push esi
call dword [sym.imp.USER32.dll_AttachThreadInput]
mov ecx, dword [0x4cb008]
test ecx, ecx
je 0x472a90
mov eax, dword [ecx]
lea edx, [eax*4 + 8]
push edx
push ecx
call fcn.0048b74c
mov ebx, eax
add dword [ebx], 1
mov ecx, dword [0x440ffd8]
mov eax, dword [ecx]
lea edx, [eax*4 + 8]
push edx
push ecx
call fcn.0048b74c
add esp, 0x10
mov dword [0x440ffd8], eax
add dword [eax], 1
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea ecx, [ebp - 0x10]
xor edx, edx
push edx
push edx
push 2
push ecx
push eax
push dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
mov eax, dword [ebp - 0x10]
push 0x20
mov edx, dword [ebx]
mov dword [ebx + edx*4], eax
mov dword [0x4cb008], ebx
call fcn.0048b682
pop ecx
mov ebx, eax
test ebx, ebx
je 0x472a70
mov eax, dword [0x440ffd8]
mov edx, dword [eax]
mov dword [eax + edx*4], ebx
jmp 0x472a22
push 0x20
call fcn.0048b682
pop ecx
mov ebx, eax
test ebx, ebx
je 0x472ad5
push ebx
push dword [0x4caff8]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x472ab9
mov dword [ebx], 0x400
push 0xffffffffffffffff
xor eax, eax
push ebx
mov dword [ebx + 4], eax
mov dword [ebx + 8], eax
mov dword [ebx + 0xc], eax
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x14], eax
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x1c], eax
call fcn.0046a0b8
add esp, 8
push dword [0x440ffd4]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x472865
push 0x6d9
push str.qwgutil.c
push 4
call fcn.004751b8
add esp, 0xc
mov ebx, dword [ebp - 4]
mov esi, dword [ebp - 8]
xor eax, eax
mov esp, ebp
pop ebp
ret
push 8
call fcn.0048b682
mov ebx, eax
mov dword [ebx], 1
push 8
call fcn.0048b682
add esp, 8
mov dword [0x440ffd8], eax
mov dword [eax], 1
jmp 0x4729c4
push 0x6ec
push str.qwgutil.c
push 5
call fcn.004751b8
push ebx
call fcn.0048b5a5
add esp, 0x10
jmp 0x472a84
push 0x6e5
push str.qwgutil.c
push 4
call fcn.004751b8
jmp 0x472a81
push 0x67d
push str.qwgutil.c
push 5
call fcn.004751b8
jmp 0x472a81
push 0x18
call fcn.0048b682
pop ecx
mov dword [0x440ffd4], eax
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
jmp 0x47283f