Function at 0x5015a6
Capabilities:
Log keystrokes via application hook

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5588ac
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x30
mov dword [ebp - 0x34], ecx
mov eax, dword [ebp - 0x34]
mov dword [eax], 0x5709b8
mov dword [ebp - 4], 2
mov dword [0x5b91fc], 0
mov ecx, dword [0x5b91e8]
push ecx
call dword [sym.imp.USER32.dll_UnhookWindowsHookEx]
call fcn.0052bd65
mov edx, dword [ebp - 0x34]
cmp dword [edx + 0xa0], 0
je 0x50181d
push 0
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax + 0xa0]
call dword [sym.imp.Lmc1.dll_public:_void___thiscall_CLmcDev::SetOwen_class_CWnd__]
mov ecx, dword [ebp - 0x34]
call fcn.00506a40
mov ecx, dword [ebp - 0x34]
mov edx, dword [ecx + 0xa0]
cmp dword [edx + 0x13544], 0
jl 0x5016e6
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax + 0xa0]
cmp dword [ecx + 0x13544], 0x10
jge 0x5016e6
mov dword [ebp - 0x10], 0
mov edx, dword [ebp - 0x34]
mov ecx, dword [edx + 0xa0]
call dword [sym.imp.Lmc1.dll_public:_unsigned_short_int___thiscall_CLmcDev::GetCurOutPortData_void_]
mov word [ebp - 0x14], ax
mov ax, word [ebp - 0x14]
mov word [ebp - 0x18], ax
mov word [ebp - 0x1c], 1
mov edx, dword [ebp - 0x1c]
and edx, 0xffff
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax + 0xa0]
mov ecx, dword [ecx + 0x13544]
shl edx, cl
mov word [ebp - 0x1c], dx
mov edx, dword [ebp - 0x34]
mov eax, dword [edx + 0xa0]
cmp dword [eax + 0x13548], 0
je 0x5016a9
xor ecx, ecx
cmp dword [ebp - 0x10], 0
sete cl
mov dword [ebp - 0x10], ecx
cmp dword [ebp - 0x10], 0
je 0x5016bd
mov dx, word [ebp - 0x14]
or dx, word [ebp - 0x1c]
mov word [ebp - 0x14], dx
jmp 0x5016d2
mov eax, dword [ebp - 0x1c]
and eax, 0xffff
not eax
mov cx, word [ebp - 0x14]
and cx, ax
mov word [ebp - 0x14], cx
mov dx, word [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax + 0xa0]
call dword [sym.imp.Lmc1.dll_public:_int___thiscall_CLmcDev::WritePort_unsigned_short_int_]
call dword [sym.imp.Lmc1.dll_class_CLmcDev____cdecl_gf_GetLmcDev_void_]
cmp dword [eax + 0x10c1c], 0
je 0x501739
call dword [sym.imp.Lmc1.dll_class_CLmcDev____cdecl_gf_GetLmcDev_void_]
cmp dword [eax + 0x10bac], 1
je 0x501713
call dword [sym.imp.Lmc1.dll_class_CLmcDev____cdecl_gf_GetLmcDev_void_]
cmp dword [eax + 0x10bac], 2
jne 0x501727
push 0
push 0
call dword [sym.imp.Lmc1.dll_class_CLmcDev____cdecl_gf_GetLmcDev_void_]
mov ecx, eax
call dword [sym.imp.Lmc1.dll_public:_int___thiscall_CLmcDev::SetCurrent_double_]
jmp 0x501739
push 0
push 0
call dword [sym.imp.Lmc1.dll_class_CLmcDev____cdecl_gf_GetLmcDev_void_]
mov ecx, eax
call dword [sym.imp.Lmc1.dll_public:_int___thiscall_CLmcDev::SetPowerAnalogOutput_double_]
mov ecx, dword [ebp - 0x34]
mov edx, dword [ecx + 0xa0]
cmp dword [edx + 0x134c0], 0
je 0x501769
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax + 0xa0]
cmp dword [ecx + 0x134bc], 0
jne 0x501769
push 0
push 0
mov ecx, dword [ebp - 0x34]
call fcn.00503ba9
call dword [sym.imp.Lmc1.dll_class_CLmcDev____cdecl_gf_GetLmcDev_void_]
cmp dword [eax + 0x10bac], 4
jne 0x50178a
push 0
push 0
call dword [sym.imp.Lmc1.dll_class_CLmcDev____cdecl_gf_GetLmcDev_void_]
mov ecx, eax
call dword [sym.imp.Lmc1.dll_public:_int___thiscall_CLmcDev::SetSPISimmerCurrent_double_]
mov edx, dword [ebp - 0x34]
mov eax, dword [edx + 0x94]
push eax
mov ecx, dword [ebp - 0x34]
call fcn.00503916
push 0
call dword [sym.imp.Lmc1.dll_class_CLmcDev____cdecl_gf_SetLmcDev_class_CLmcDev__]
add esp, 4
push ecx
mov ecx, esp
mov dword [ebp - 0x20], esp
mov edx, dword [ebp - 0x34]
mov eax, dword [edx + 0xa0]
push eax
push ecx
mov ecx, dword [ebp - 0x34]
call fcn.00503868
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp - 0x34]
mov edx, dword [ecx + 0xa0]
add edx, 0x10ba8
push edx
call dword [sym.imp.Lmc1.dll_int___cdecl_gf_SaveLmcCfg_struct_LmcCfg___class_CString_]
add esp, 8
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax + 0xa0]
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x24], edx
cmp dword [ebp - 0x24], 0
je 0x501803
push 1
mov ecx, dword [ebp - 0x24]
call fcn.00507050
mov dword [ebp - 0x3c], eax
jmp 0x50180a
mov dword [ebp - 0x3c], 0
mov eax, dword [ebp - 0x34]
mov dword [eax + 0xa0], 0
call dword [sym.imp.Lmc1.dll_void___cdecl_lmc_CloseDriver_void_]
mov ecx, dword [ebp - 0x34]
cmp dword [ecx + 0xa8], 0
je 0x50184e
mov edx, dword [ebp - 0x34]
mov eax, dword [edx + 0xa8]
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x2c]
push ecx
call sub.MFC42u.DLL_operatordelete
add esp, 4
mov edx, dword [ebp - 0x34]
mov dword [edx + 0xa8], 0
mov eax, dword [ebp - 0x34]
cmp dword [eax + 0xac], 0
je 0x50187f
mov ecx, dword [ebp - 0x34]
mov edx, dword [ecx + 0xac]
mov dword [ebp - 0x30], edx
mov eax, dword [ebp - 0x30]
push eax
call sub.MFC42u.DLL_operatordelete
add esp, 4
mov ecx, dword [ebp - 0x34]
mov dword [ecx + 0xac], 0
call dword [sym.imp.Lmc1.dll_void___cdecl_gf_CloseUsbMonitor_void_]
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x34]
add ecx, 0xc4
call fcn.00401e50
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x34]
add ecx, 0xbc
call fcn.00401e50
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x34]
call fcn.00548a52
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret