Function at 0x502846
Capabilities:
Log keystrokes via application hook

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55c55c
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], 0x5749d0
mov dword [ebp - 4], 2
mov dword [0x5be1f4], 0
mov ecx, dword [0x5be1e0]
push ecx
call dword [sym.imp.USER32.dll_UnhookWindowsHookEx]
call fcn.0052b70a
mov edx, dword [ebp - 0x34]
cmp dword [edx + 0xa0], 0
je 0x502abd
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.00507ba1
mov ecx, dword [ebp - 0x34]
mov edx, dword [ecx + 0xa0]
cmp dword [edx + 0x13544], 0
jl 0x502986
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax + 0xa0]
cmp dword [ecx + 0x13544], 0x10
jge 0x502986
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 0x502949
xor ecx, ecx
cmp dword [ebp - 0x10], 0
sete cl
mov dword [ebp - 0x10], ecx
cmp dword [ebp - 0x10], 0
je 0x50295d
mov dx, word [ebp - 0x14]
or dx, word [ebp - 0x1c]
mov word [ebp - 0x14], dx
jmp 0x502972
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 0x5029d9
call dword [sym.imp.Lmc1.dll_class_CLmcDev____cdecl_gf_GetLmcDev_void_]
cmp dword [eax + 0x10bac], 1
je 0x5029b3
call dword [sym.imp.Lmc1.dll_class_CLmcDev____cdecl_gf_GetLmcDev_void_]
cmp dword [eax + 0x10bac], 2
jne 0x5029c7
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 0x5029d9
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 0x502a09
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax + 0xa0]
cmp dword [ecx + 0x134bc], 0
jne 0x502a09
push 0
push 0
mov ecx, dword [ebp - 0x34]
call fcn.00504b90
call dword [sym.imp.Lmc1.dll_class_CLmcDev____cdecl_gf_GetLmcDev_void_]
cmp dword [eax + 0x10bac], 4
jne 0x502a2a
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.005048fd
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.0050484f
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 0x502aa3
push 1
mov ecx, dword [ebp - 0x24]
call fcn.00508190
mov dword [ebp - 0x3c], eax
jmp 0x502aaa
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 0x502aee
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 0x502b1f
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.00548802
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret