Function at 0x4039c0
Capabilities:
Hide graphical window
Log keystrokes via polling

Disassembly:
sub esp, 0x24
lea eax, [esp + 8]
push 1
push 0
push 0
push 0
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x4040b8
push ebx
mov ebx, dword [sym.imp.lua54.dll_lua_rotate]
push ebp
mov ebp, dword [sym.imp.USER32.dll_GetParent]
push esi
mov esi, dword [sym.imp.USER32.dll_GetWindowLongA]
push edi
mov edi, dword [esp + 0x38]
nop dword [eax + eax]
mov eax, dword [esp + 0x1c]
cmp eax, 0x402
jb 0x403f42
mov ecx, dword [sym.imp.lua54.dll_WM_LUAMAX]
xor edx, edx
cmp edx, dword [ecx + 4]
jg 0x403f42
jl 0x403a2a
cmp eax, dword [ecx]
ja 0x403f42
push edi
xor ebp, ebp
call dword [sym.imp.lua54.dll_lua_gettop]
mov dword [esp + 0x18], eax
add esp, 4
mov eax, dword [esp + 0x18]
test eax, eax
je 0x403d84
push 0xffffffffffffffeb
push eax
call esi
mov ebp, eax
test ebp, ebp
je 0x40405a
mov eax, dword [ebp + 0x14]
cdq
push edx
push eax
push 0xfff0b9d8
push edi
call dword [sym.imp.lua54.dll_lua_rawgeti]
add esp, 0x10
cmp eax, 5
jne 0x404093
mov esi, dword [sym.imp.lua54.dll_lua_gettop]
push edi
call esi
mov ebx, eax
lea eax, [esp + 0x14]
push eax
push 0
push dword [esp + 0x28]
push edi
call dword [sym.imp.lua54.dll_lua_getevent]
add esp, 0x14
cmp dword [esp + 0x10], 6
jne 0x403b5b
push 0xfffffffffffffffe
push edi
call dword [sym.imp.lua54.dll_lua_pushvalue]
lea eax, [esp + 0x20]
push eax
push edi
call dword [sym.imp.lua54.dll_lua_pushlightuserdata]
push 0
push 0
push 0
push 0xffffffffffffffff
push 2
push edi
call dword [sym.imp.lua54.dll_lua_pcallk]
add esp, 0x28
test eax, eax
je 0x403ad5
push edi
call dword [sym.imp.lua54.dll_lua_error]
add esp, 4
push edi
call esi
mov esi, eax
add esp, 4
sub esi, ebx
cmp esi, 1
jne 0x403b1c
mov ebx, dword [sym.imp.lua54.dll_lua_type]
push 0xffffffffffffffff
push edi
call ebx
add esp, 8
test eax, eax
jne 0x403b08
mov eax, dword [sym.imp.lua54.dll_lua_settop]
push 0xfffffffffffffffe
push edi
call eax
add esp, 8
jmp 0x403e06
mov eax, dword [sym.imp.lua54.dll_lua_rotate]
push 1
push 0xfffffffffffffffe
push edi
call eax
add esp, 0xc
jmp 0x403e06
jle case.0x403b98.1031
mov eax, esi
not eax
push eax
push edi
call dword [sym.imp.lua54.dll_lua_pushvalue]
mov ebx, dword [sym.imp.lua54.dll_lua_rotate]
mov eax, 0xfffffffe
push 0xffffffffffffffff
sub eax, esi
push eax
push edi
call ebx
mov eax, dword [sym.imp.lua54.dll_lua_settop]
push 0xfffffffffffffffe
push edi
call eax
push 1
neg esi
push esi
push edi
call ebx
add esp, 0x28
jmp case.0x403b98.1031
push eax
push 0xffffffffffffffff
push edi
call dword [sym.imp.lua54.dll_lua_getfield]
add esp, 0xc
test eax, eax
je 0x403d75
mov eax, dword [sym.imp.lua54.dll_lua_rotate]
push 1
push 0xfffffffffffffffe
push edi
call eax
mov eax, dword [esp + 0x28]
add esp, 0xc
add eax, 0xfffffbfa
cmp eax, 0x11
ja case.0x403b98.1031
movzx eax, byte [eax + 0x4040e4]
jmp dword [eax*4 + 0x4040c8]
mov edx, dword [ebp + 8]
cmp edx, dword [0x41d244]
jl case.0x403b98.1031
cmp edx, dword [0x41d248]
jg case.0x403b98.1031
mov ecx, dword [esp + 0x20]
test ecx, ecx
je case.0x403b98.1031
xor eax, eax
cmp edx, dword [0x41d23c]
cmove eax, ecx
push eax
lea eax, [ecx - 1]
push eax
push ebp
push edi
call fcn.0040e720
add esp, 0x10
jmp case.0x403b98.1031
mov eax, dword [esp + 0x20]
push dword [eax*4 + 0x41c038]
push edi
call dword [sym.imp.lua54.dll_lua_pushstring]
movsx eax, word [esp + 0x2c]
mov ebx, dword [sym.imp.lua54.dll_lua_pushinteger]
cdq
push edx
push eax
push edi
call ebx
mov eax, dword [esp + 0x38]
shr eax, 0x10
cwde
cdq
push edx
push eax
push edi
call ebx
add esp, 0x20
jmp case.0x403b98.1031
mov eax, dword [ebp + 8]
cmp eax, dword [0x41d240]
jne 0x403c4a
push 0
push 0
push 0x407
push dword [ebp + 4]
call dword [sym.imp.USER32.dll_SendMessageA]
push eax
push edi
call fcn.00406930
add esp, 8
jmp case.0x403b98.1031
cmp eax, dword [0x41d23c]
jne 0x403ca4
cmp dword [esp + 0x20], 0
je 0x403c72
push 0xffffffffffffffff
push dword [esp + 0x28]
push edi
call dword [sym.imp.lua54.dll_lua_pushlwstring]
push dword [esp + 0x30]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
jmp 0x403c7f
push dword [esp + 0x24]
push 0
push ebp
push edi
call fcn.0040e720
add esp, 0x10
mov eax, str.removed
cmp dword [esp + 0x20], 0
mov ecx, str.edited
cmove eax, ecx
push eax
push edi
call dword [sym.imp.lua54.dll_lua_pushstring]
add esp, 8
jmp case.0x403b98.1031
cmp eax, dword [0x41d238]
jne case.0x403b98.1031
push 0x20000
push 0
push 0x445
push dword [ebp + 4]
call dword [sym.imp.USER32.dll_SendMessageA]
jmp case.0x403b98.1031
mov eax, dword [ebp + 8]
cmp eax, dword [0x41d25c]
jne 0x403ce6
push dword [ebp + 4]
push edi
call fcn.00406930
add esp, 8
jmp case.0x403b98.1031
cmp eax, dword [0x41d244]
jl 0x403d0d
cmp eax, dword [0x41d248]
jg 0x403d0d
push dword [esp + 0x24]
push dword [esp + 0x24]
push ebp
push edi
call fcn.0040e720
add esp, 0x10
jmp case.0x403b98.1031
cmp eax, dword [0x41d254]
jne 0x403d26
push dword [ebp + 4]
push edi
call fcn.00408fe0
add esp, 8
jmp case.0x403b98.1031
cmp eax, dword [0x41d238]
jne case.0x403b98.1031
mov ebx, dword [sym.imp.lua54.dll_lua_pushinteger]
push 0
push dword [esp + 0x24]
push edi
call ebx
mov eax, dword [esp + 0x30]
cdq
push edx
push eax
push edi
call ebx
add esp, 0x18
jmp case.0x403b98.1031
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x403c94
push 1
lea eax, [esp + 0x28]
push eax
push edi
call dword [sym.imp.lua54.dll_lua_pushlstring]
add esp, 0xc
jmp case.0x403b98.1031
mov eax, dword [sym.imp.lua54.dll_lua_settop]
push 0xfffffffffffffffe
push edi
call eax
add esp, 8
jmp case.0x403b98.1031
cmp dword [esp + 0x1c], 0x414
jne 0x40405a
push 0
push dword [esp + 0x24]
push 0xfff0b9d8
push edi
call dword [sym.imp.lua54.dll_lua_rawgeti]
add esp, 0x10
cmp eax, 5
jne case.0x403b98.1031
push str.onClick
push 0xffffffffffffffff
push edi
call dword [sym.imp.lua54.dll_lua_getfield]
add esp, 0xc
test eax, eax
je case.0x403b98.1031
push 1
push 0xfffffffffffffffe
push edi
call ebx
mov eax, dword [esp + 0x30]
add esp, 0xc
cmp eax, 0xffffffff
jle case.0x403b98.1031
cdq
push edx
push eax
push edi
call dword [sym.imp.lua54.dll_lua_pushinteger]
push 2
push str.MenuItem
push edi
call dword [sym.imp.lua54.dll_lua_pushnewinstance]
push 0xffffffffffffffff
push 0xfffffffffffffffe
push edi
call ebx
mov eax, dword [sym.imp.lua54.dll_lua_settop]
push 0xfffffffffffffffe
push edi
call eax
add esp, 0x2c
mov ebx, dword [sym.imp.lua54.dll_lua_type]
push edi
call dword [sym.imp.lua54.dll_lua_gettop]
mov esi, eax
add esp, 4
sub esi, dword [esp + 0x14]
sub esi, 1
jne 0x403e3c
push 0xffffffffffffffff
push edi
call ebx
add esp, 8
cmp eax, 6
je 0x403e3c
mov eax, dword [ebp + 8]
cmp eax, dword [0x41d24c]
jle 0x404070
jmp 0x40405a
push edi
call dword [sym.imp.lua54.dll_search_task]
add esp, 4
mov dword [esp + 0x14], eax
lea ebx, [eax + 0x1c]
test eax, eax
je 0x403e57
mov dword [ebx], 1
push 0
push 0
push 0
push 0xffffffffffffffff
push esi
push edi
call dword [sym.imp.lua54.dll_lua_pcallk]
add esp, 0x18
test eax, eax
je 0x403e78
push edi
call dword [sym.imp.lua54.dll_lua_error]
add esp, 4
cmp dword [esp + 0x14], 0
je 0x403e85
mov dword [ebx], 0
mov eax, dword [esp + 0x1c]
cmp eax, 0x40e
jne 0x403eb9
mov eax, dword [ebp + 8]
cmp eax, dword [0x41d238]
jne 0x404070
push 0xa0001
push 0
push 0x445
push dword [ebp + 4]
call dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x404070
cmp eax, 0x408
jne 0x404070
push edi
call dword [sym.imp.lua54.dll_lua_gettop]
mov esi, eax
add esp, 4
test esi, esi
je 0x403ee4
push 0xffffffffffffffff
push edi
call dword [sym.imp.lua54.dll_lua_toboolean]
add esp, 8
test eax, eax
je 0x403f2d
push 0
push dword [ebp + 4]
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [ebp + 8]
cmp eax, dword [0x41d274]
jne 0x403f1a
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x403f1a
push 1
push eax
call dword [sym.imp.USER32.dll_EnableWindow]
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_SetActiveWindow]
mov dword [ebp + 0xc], 0
cmp dword [ebp + 0x8c], 0
je 0x403f2d
mov dword [ebp + 0x8c], 0
or eax, 0xffffffff
sub eax, esi
push eax
push edi
call dword [sym.imp.lua54.dll_lua_settop]
add esp, 8
jmp 0x404070
push 0xffffffffffffffeb
push dword [esp + 0x1c]
call esi
mov ebx, eax
test ebx, ebx
je 0x40405a
nop dword [eax]
nop dword [eax + eax]
mov ecx, dword [ebx + 8]
mov eax, dword [0x41d248]
cmp ecx, dword [0x41d274]
je 0x403f99
cmp ecx, eax
je 0x403f99
cmp ecx, dword [0x41d22c]
je 0x403f99
cmp ecx, dword [0x41d26c]
je 0x403f99
push 0xffffffffffffffeb
push dword [ebx + 4]
call ebp
push eax
call esi
mov ebx, eax
test ebx, ebx
jne 0x403f60
jmp 0x40405a
cmp dword [esp + 0x1c], 0x100
mov ebp, dword [ebx + 4]
jne 0x404045
cmp dword [esp + 0x20], 9
jne 0x404045
cmp ecx, eax
jne 0x403ff0
push 0
push 0
push 0
push 0x130b
push ebp
call dword [sym.imp.USER32.dll_SendMessageW]
push eax
push ebx
call fcn.0040e5b0
mov esi, eax
push dword [esi + 0xc]
mov ebp, dword [esi + 0x18]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov esi, dword [sym.imp.USER32.dll_GetWindowLongA]
add esp, 0x14
push 0xffffffffffffffeb
push dword [esp + 0x1c]
call esi
test eax, eax
je 0x404045
mov eax, dword [eax + 8]
cmp eax, dword [0x41d238]
je 0x404045
push 0x10
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
shr eax, 0xf
and eax, 1
push eax
push dword [esp + 0x1c]
push ebp
call dword [sym.imp.USER32.dll_GetNextDlgTabItem]
push eax
call dword [sym.imp.USER32.dll_SetFocus]
push 9
push 9
call fcn.004111d0
add esp, 4
push eax
push 0x415
push dword [ebx + 4]
call dword [sym.imp.USER32.dll_PostMessageA]
jmp 0x40408d
lea eax, [esp + 0x18]
push eax
push dword [ebx + 0x3c]
push dword [ebx + 4]
call dword [sym.imp.USER32.dll_TranslateAcceleratorW]
test eax, eax
jne 0x404065
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push edi
call dword [sym.imp.lua54.dll_lua_gettop]
or ecx, 0xffffffff
sub ecx, eax
push ecx
push edi
call dword [sym.imp.lua54.dll_lua_settop]
mov esi, dword [sym.imp.USER32.dll_GetWindowLongA]
add esp, 0xc
mov ebx, dword [sym.imp.lua54.dll_lua_rotate]
push 1
push 0
push 0
push 0
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
mov ebp, dword [sym.imp.USER32.dll_GetParent]
test eax, eax
jne 0x403a00
pop edi
pop esi
pop ebp
pop ebx
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
add esp, 0x24
ret