Function at 0x436808
Capabilities:
Check mutex on windows
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa8
push ebx
push esi
push edi
call fcn.0042eb93
mov byte [0x4a0c64], 0
mov dword [ebp - 0x50], 0
push 0x11
call sub.user32.dll_GetAsyncKeyState
test ax, 0x8000
jne 0x436907
push str._T_SpecEmu_0A33_4644_SpecEmu_6721
push 1
push 0
call sub.kernel32.dll_CreateMutexA
mov dword [ebp - 0x50], eax
call sub.kernel32.dll_GetLastError
cmp eax, 0xb7
jne 0x4368d0
push 0
push str.SpecEmuClass
call sub.user32.dll_FindWindowA
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x54], 0
je 0x4368c5
push dword [ebp - 0x54]
call sub.user32.dll_IsIconic
or eax, eax
je 0x43687d
push 9
push dword [ebp - 0x54]
call sub.user32.dll_ShowWindow
push dword [ebp - 0x54]
call sub.user32.dll_SetForegroundWindow
push 0x642b3c
push 1
call fcn.0043db50
cmp eax, 1
jne 0x4368c5
mov dword [0x4a0b74], 0x53504543
mov dword [0x4a0b78], 0x104
mov dword [0x4a0b7c], 0x642b3c
push 0x4a0b74
push 0
push 0x4a
push dword [ebp - 0x54]
call sub.user32.dll_SendMessageA
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x10
or eax, eax
je 0x436907
push 0x4859b2
push 0
call fcn.0043dc44
push 0x30
push 0x442440
push str.Internal_Mutex_error_r_n_r_nError_Code:_0x
push dword [0x49ff24]
call sub.user32.dll_MessageBoxA
push 0
call sub.kernel32.dll_ExitProcess
push dword [ebp + 8]
pop dword [0x4a0c14]
call fcn.00407bb0
or eax, eax
jne 0x436943
push 0x4859fa
push 0
call fcn.0043dc44
push 0x30
push 0x442440
push str.atapi.dll_unavailable_or_incorrect_version_r_n_r_nError_Code:_0x
push dword [0x49ff24]
call sub.user32.dll_MessageBoxA
push 0
call sub.kernel32.dll_ExitProcess
call fcn.00408090
or eax, eax
jne 0x436976
push 0x485a43
push 0
call fcn.0043dc44
push 0x30
push 0x442440
push str.wd1793.dll_unavailable_or_incorrect_version_r_n_r_nError_Code:_0x
push dword [0x49ff24]
call sub.user32.dll_MessageBoxA
push 0
call sub.kernel32.dll_ExitProcess
call fcn.00408289
or eax, eax
jne 0x4369a9
push 0x485a8c
push 0
call fcn.0043dc44
push 0x30
push 0x442440
push str.emulib.dll_unavailable_or_incorrect_version_r_n_r_nError_Code:_0x
push dword [0x49ff24]
call sub.user32.dll_MessageBoxA
push 0
call sub.kernel32.dll_ExitProcess
call dword [0x4c70d4]
mov dword [0x4a0bb0], eax
call dword [0x4c7140]
mov dword [0x4a0bb4], eax
call dword [0x4c7140]
mov dword [0x4a0bbc], eax
call dword [0x4c7140]
mov dword [0x4a0bb8], eax
call fcn.0043cc28
or eax, eax
jne 0x436a0d
call fcn.0043cd38
push 0x485ac5
push 0
call fcn.0043dc44
push 0x30
push 0x442440
push str.Couldnt_allocate_resources_r_n_r_nError_Code:_0x
push dword [0x49ff24]
call sub.user32.dll_MessageBoxA
push 0
call sub.kernel32.dll_ExitProcess
call fcn.0042ecaa
call fcn.00409a2c
push 0x643d84
push 0
push dword [0x4a0bb0]
call dword [0x4c70e0]
push 0x643e88
push 1
push dword [0x4a0bb0]
call dword [0x4c70e0]
call fcn.00407ee1
call fcn.0040d130
call fcn.0040d14b
call fcn.0040cc64
call fcn.0043c6d8
cmp byte [0x4a0c42], 1
jne 0x436a89
push 0x485b0e
push 0
call fcn.0043dc44
push 0x30
push 0x442440
push str.ROM_file_s__missing_from_application_folder_r_n_r_nError_Code:_0x
push dword [0x49ff24]
call sub.user32.dll_MessageBoxA
push 0
call sub.kernel32.dll_ExitProcess
call sub.fdc765.dll_u765_Initialise
mov dword [0x4a0bac], eax
call fcn.00408325
call fcn.0040b6a0
call fcn.0043cc16
mov byte [0x4a0c65], 1
mov byte [0x4fa991], 0
mov byte [0x4fa994], 0
mov byte [0x4a0c47], 1
mov byte [0x4fb70a], 0
mov byte [0x4fb70b], 0
mov dword [0x4fa9bc], 1
mov byte [0x4a0baa], 1
push 0x4a0338
call fcn.004012e2
mov dword [ebp - 0x30], 0x30
mov dword [ebp - 0x2c], 3
mov dword [ebp - 0x28], 0x437060
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
push dword [ebp + 8]
pop dword [ebp - 0x1c]
push 1
call sub.gdi32.dll_GetStockObject
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], str.SpecEmuClass
push dword [0x49ff2c]
pop dword [ebp - 0x18]
push dword [0x49ff2c]
pop dword [ebp - 4]
push dword [0x4a0c30]
pop dword [ebp - 0x14]
lea eax, [ebp - 0x30]
push eax
call sub.user32.dll_RegisterClassExA
call fcn.0040cc30
mov dword [0x4fa738], eax
push 0
push dword [ebp + 8]
push 0
push 0
push 0
push 0
push 0
push 0
push 0x90cf0000
push 0x442440
push str.SpecEmuClass
push 0x10
call sub.user32.dll_CreateWindowExA
mov dword [0x49ff24], eax
or eax, eax
jne 0x436bb5
call fcn.0043cd38
push 0x485b48
push 0
call fcn.0043dc44
push 0x30
push 0x442440
push str.Failed_to_create_main_window_r_n_r_nError_Code:_0x
push dword [0x49ff24]
call sub.user32.dll_MessageBoxA
push 0
call sub.kernel32.dll_ExitProcess
call fcn.0042fc02
push 0x4a0110
call fcn.004012e2
push 0x486b30
call fcn.004012e2
push 0x4930d0
call fcn.004012e2
mov byte [0x445033], 1
call fcn.0042a660
push 0x4a0b60
push dword [0x49ff24]
call sub.user32.dll_GetWindowRect
mov dword [0x4fa730], 0
call fcn.0040bdc0
push dword [0x49ff24]
call fcn.0040c0eb
mov dword [0x4a0eb4], 0x32
call fcn.004074d8
call fcn.00406847
mov al, byte [0x4c7230]
push eax
push 0x4fb2a0
call fcn.0040e19c
or eax, eax
jne 0x436c60
push 0x485b8f
push 0
call fcn.0043dc44
push 0x30
push 0x442440
push str.Cannot_create_a_Spectrum_machine_instance_r_n_r_nError_Code:_0x
push dword [0x49ff24]
call sub.user32.dll_MessageBoxA
push 0
call sub.kernel32.dll_ExitProcess
mov byte [0x4fb70e], 1
call fcn.00439e8e
push dword [ebp + 0x14]
push dword [0x49ff24]
call sub.user32.dll_ShowWindow
push dword [0x49ff24]
call sub.user32.dll_UpdateWindow
call fcn.0042dc00
cmp byte [0x4c7230], 5
jbe 0x436c9a
mov byte [0x4c7233], 0
cmp byte [0x4c7233], 1
jne 0x436caa
mov byte [0x4c7235], 0
cmp byte [0x4c7235], 1
jne 0x436cba
mov byte [0x4c7236], 0
cmp byte [0x4c7236], 1
jne 0x436cca
mov byte [0x4c7232], 0
cmp byte [0x4c7232], 1
jne 0x436cdc
mov byte [0x4c7231], 0
jmp 0x436ce3
mov byte [0x4c7231], 1
mov byte [0x4a0c4d], 0
mov byte [0x4a0c4f], 0
mov byte [0x4a0c50], 0
mov byte [0x4a0c52], 0
mov byte [0x4a0c53], 0
call fcn.0040b6e0
push 0
push 0x409d2b
push dword [0x49ff24]
push 0x514
push dword [ebp + 8]
call sub.user32.dll_CreateDialogParamA
mov dword [0x49ff38], eax
cmp byte [0x4c7232], 1
jne 0x436d40
push 5
push dword [0x49ff38]
call sub.user32.dll_ShowWindow
push 0
push 0x404c50
push dword [0x49ff24]
push 0xd48
push dword [ebp + 8]
call sub.user32.dll_CreateDialogParamA
mov dword [0x49ff48], eax
call fcn.00404e60
push 0
push 0x40a600
push dword [0x49ff24]
push 0xbd6
push dword [ebp + 8]
call sub.user32.dll_CreateDialogParamA
mov dword [0x49ff3c], eax
push 0
push 0x40abb8
push dword [0x49ff24]
push 0x1004
push dword [ebp + 8]
call sub.user32.dll_CreateDialogParamA
mov dword [0x49ff40], eax
push 0
push 0x4304e3
push dword [0x49ff24]
push 0x1036
push dword [ebp + 8]
call sub.user32.dll_CreateDialogParamA
mov dword [0x49ff44], eax
push dword [0x49ff24]
call sub.user32.dll_SetFocus
cmp byte [0x4c7249], 1
jne 0x436de5
call fcn.0040bf79
push dword [0x49ff24]
call fcn.0043d4ed
mov byte [0x4a0c64], 1
call sub.kernel32.dll_GetTickCount
mov dword [0x4a0c34], eax
push 1
push 0
push 0
push 0
lea eax, [ebp - 0x4c]
push eax
call sub.user32.dll_PeekMessageA
or eax, eax
je 0x436e2e
cmp dword [ebp - 0x48], 0x12
je 0x43702a
lea eax, [ebp - 0x4c]
push eax
call sub.user32.dll_TranslateMessage
lea eax, [ebp - 0x4c]
push eax
call sub.user32.dll_DispatchMessageA
jmp 0x436df6
cmp byte [0x4a0c65], 0
jne 0x436e74
cmp byte [0x4fa992], 1
jne 0x436e68
cmp byte [0x47620c], 1
jne 0x436e68
push dword [0x49ff24]
call fcn.0040c670
or eax, eax
jne 0x436e5f
mov byte [0x4fa992], 0
push 1
call sub.kernel32.dll_Sleep
jmp 0x436e72
call sub.user32.dll_WaitMessage
call fcn.0040b1d0
jmp 0x436df6
cmp byte [0x4a0baa], 0
jne 0x436e99
cmp dword [0x4fa730], 1
je 0x436e8f
cmp byte [0x4c726c], 1
jne 0x436e99
call sub.user32.dll_WaitMessage
jmp 0x436df6
cmp byte [0x4a0c64], 1
jne 0x437025
cmp byte [0x44d015], 0
jne 0x437025
mov byte [0x445037], 1
cmp byte [0x445033], 1
je 0x436ee4
cmp byte [0x445033], 2
jne 0x436ed8
call fcn.00405440
call fcn.0042ad60
jmp 0x436f24
call fcn.0040b200
call fcn.0042b94c
jmp 0x436f24
cmp dword [0x478490], 0
jne 0x436efe
call fcn.00405440
call fcn.0040b200
call fcn.00418b91
jmp 0x436f24
call fcn.0040b200
call fcn.004289a9
cmp eax, 1
jne 0x436f24
push 0x42524b
push 0x1b
push 0x100
push dword [0x49ff24]
call sub.user32.dll_PostMessageA
cmp byte [0x4fa993], 1
jne 0x436f78
mov byte [0x4fa993], 0
cmp byte [0x47615e], 1
jne 0x436f42
call fcn.0040bc6a
mov byte [0x4fa992], 1
cmp dword [0x4fa730], 1
jne 0x436f57
call fcn.0043ce30
cmp byte [0x47620c], 1
jne 0x436fa9
push dword [0x49ff24]
call fcn.0040c4f0
or eax, eax
jne 0x436f76
mov byte [0x4fa992], 0
jmp 0x436fa9
cmp byte [0x4fa992], 1
je 0x436f8a
cmp dword [0x4fa970], 0
jbe 0x436fa9
cmp byte [0x47620c], 1
jne 0x436fa9
push dword [0x49ff24]
call fcn.0040c4f0
or eax, eax
jne 0x436fa9
mov byte [0x4fa992], 0
cmp byte [0x4fb6d1], 0
jbe 0x436fb8
dec byte [0x4fb6d1]
cmp byte [0x4fb71a], 1
je 0x436fca
cmp byte [0x4a0c48], 0
jne 0x437025
cmp dword [0x4fb6d0], 0
jne 0x436fe5
cmp byte [0x4fb70d], 1
jne 0x436ff1
cmp byte [0x4c724b], 1
jne 0x436ff1
call sub.kernel32.dll_GetTickCount
mov dword [0x4a0c34], eax
jmp 0x437025
movzx eax, byte [0x4c723d]
mov ecx, 0x14
mul ecx
add dword [0x4a0c34], eax
call sub.kernel32.dll_GetTickCount
jmp 0x437018
push 1
call sub.kernel32.dll_Sleep
call sub.kernel32.dll_GetTickCount
cmp eax, dword [0x4a0c34]
jb 0x43700c
mov dword [0x4a0c34], eax
jmp 0x436df6
call fcn.0042fe20
push dword [0x49ff2c]
call sub.user32.dll_DestroyIcon
cmp dword [ebp - 0x50], 0
je 0x437048
push dword [ebp - 0x50]
call sub.kernel32.dll_ReleaseMutex
mov eax, dword [ebp - 0x44]
pop edi
pop esi
pop ebx
leave
ret 0x10