Function at 0x401000
Capabilities:
Allocate thread local storage
Log keystrokes via polling

Disassembly:
push 0x4c
push 0
push 0x40a4ec
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0
call sub.KERNEL32.dll_GetModuleHandleA
mov dword [0x40a4f0], eax
push 0
push 0x1000
push 0
call sub.KERNEL32.dll_HeapCreate
mov dword [0x40a4ec], eax
call fcn.00406630
call fcn.00405c03
call fcn.00405b9c
call fcn.00405b61
call fcn.00405ad8
call fcn.00405225
call fcn.0040508f
call fcn.00403c73
call fcn.004035ff
call fcn.00403460
call fcn.00402646
call fcn.00402242
call fcn.004030ff
mov ebx, eax
and ebx, ebx
jne 0x40109f
push 0
push str.Cant_initialize_the_network__
push str.Error
call fcn.00402279
jmp 0x401b57
push str.PMMA.ini
call fcn.0040268a
mov ebx, eax
and ebx, ebx
jne 0x4010b8
mov byte [0x40a530], 1
jmp 0x4010bf
mov byte [0x40a530], 0
push str.PMMA
call fcn.00402923
call fcn.00406660
push eax
push eax
push str.127.0.0.1
push str.IP_Address
call fcn.00402a4e
push 0x40a4f8
call fcn.00406680
call fcn.00406660
push eax
push eax
push str.Administrator
push str.User
call fcn.00402a4e
push 0x40a4fc
call fcn.00406680
call fcn.00406660
push eax
push eax
push str.admin
push str.Password
call fcn.00402a4e
push 0x40a500
call fcn.00406680
call fcn.00402b63
movsx ebx, byte [0x40a530]
cmp ebx, 1
jne 0x4011d2
push str.PMMA.ini
call fcn.00402b75
push str.PMMA
call fcn.00402923
push str._c__Hippy_2012___licensed_under_the_WTFPL
call fcn.00402bca
push str._________________________________________
call fcn.00402bca
push 0x40900e
call fcn.00402bca
push str.Enter_the_IP_address_of_the_MA2_Console...__perhaps_your_network_cards_address_or_127.0.0.1_for_local_only_
call fcn.00402bca
push dword [0x40a4f8]
push str.IP_Address
call fcn.00402cee
push str.Enter_the_username_on_the_MA2_Console...
call fcn.00402bca
push dword [0x40a4fc]
push str.User
call fcn.00402cee
push str.Enter_the_password_for_the_said_username_on_the_MA2_Console...
call fcn.00402bca
push dword [0x40a500]
push str.Password
call fcn.00402cee
call fcn.00402b63
push str.A_new_settings_file_called_PMMA.ini_has_been_created_in_the_directory_where_this_program_was_run._Please_edit_this_file_with_notepad_to_update_your_credentials_and_IP_address_for_your_MA2_console
push str.PM_MA
call fcn.004022a8
mov dword [0x40a504], 0x7530
mov byte [0x40a531], 0
mov edx, 0x40900e
lea ecx, [0x40a508]
call fcn.00402008
mov edx, 0x40900e
lea ecx, [0x40a50c]
call fcn.00402008
mov byte [0x40a532], 0
mov byte [0x40a533], 1
mov byte [0x40a534], 0
mov edx, 0x40902e
lea ecx, [0x40a510]
call fcn.00402008
push 0x1000
call fcn.00403490
mov dword [0x40a514], eax
push 0x1000
call fcn.00403490
mov dword [0x40a518], eax
push str.PM_MA
push 0x64
push 0x64
push 0x64
push 0x64
push 0xffffffff
call fcn.00403fc3
mov dword [0x40a51c], eax
push 1
push dword [0x40a51c]
call fcn.00403fe8
push 0xc
push str.Verdana
push 1
call fcn.00405cf9
and eax, eax
je 0x4012ab
push 1
call fcn.00405d0f
push eax
push 0xffffffff
call fcn.00403689
push 1
push dword [0x40a504]
push dword [0x40a4f8]
call fcn.00403140
mov dword [0x40a520], eax
push 0x64
call sub.KERNEL32.dll_Sleep
cmp dword [0x40a520], 0
je 0x40175a
mov byte [0x40a535], 1
mov dword [0x40a524], 0
push 0x64
call sub.KERNEL32.dll_Sleep
inc dword [0x40a524]
push 0x1000
push dword [0x40a514]
push dword [0x40a520]
call fcn.00403241
mov dword [0x40a528], eax
mov ebx, dword [0x40a528]
cmp ebx, 0xffffffff
jne 0x401379
push 1
push str.Login
push 0x14
push 0x78
push 0x14
push 0
push 0
call fcn.00403748
push 1
push str.Connection_Lost
push 0x28
push 0x78
push 0x3c
push 0
push 1
call fcn.00403748
jmp 0x4017aa
mov ebx, dword [0x40a528]
and ebx, ebx
jle 0x4014c5
call fcn.00406660
push eax
push str.Please_login__
call fcn.00406660
push eax
push eax
push 0x32
call fcn.00406660
push eax
push eax
push dword [0x40a514]
call fcn.004034b0
call fcn.00406722
add dword [esp], edx
call fcn.00402040
call fcn.00406722
add dword [esp], edx
call fcn.00402190
call fcn.00406740
mov ebx, eax
and ebx, ebx
jle 0x4014c5
call fcn.00406660
push eax
mov edx, str.login
call fcn.00406770
mov edx, dword [0x40a4fc]
call fcn.00406770
mov edx, 0x409014
call fcn.00406770
mov edx, dword [0x40a500]
call fcn.00406770
mov edx, 0x4091c1
call fcn.00406770
push 0x40a508
call fcn.00406680
push dword [0x40a508]
call fcn.004021b0
push eax
push dword [0x40a508]
push dword [0x40a518]
call fcn.00403500
push dword [0x40a508]
call fcn.004021b0
push eax
push dword [0x40a518]
push dword [0x40a520]
call fcn.004032ad
mov dword [0x40a528], eax
mov ebx, dword [0x40a528]
cmp ebx, 0xffffffff
jne 0x4014bc
push 1
push str.Login
push 0x14
push 0x78
push 0x14
push 0
push 0
call fcn.00403748
push 1
push str.Connection_Lost
push 0x28
push 0x78
push 0x3c
push 0
push 1
call fcn.00403748
jmp 0x4017aa
mov byte [0x40a535], 0
jmp 0x4014c5
movsx ebx, byte [0x40a535]
and ebx, ebx
je 0x4014dd
mov ebx, dword [0x40a524]
cmp ebx, 0x32
jg 0x4014dd
jmp 0x4014e4
mov eax, 1
jmp 0x4014e6
xor eax, eax
and eax, eax
je 0x4012ee
mov ebx, dword [0x40a524]
cmp ebx, 0x32
jle 0x40154e
push 1
push str.Login
push 0x14
push 0x78
push 0x14
push 0
push 0
call fcn.00403748
push 1
push str.Timeout
push 0x28
push 0x78
push 0x3c
push 0
push 1
call fcn.00403748
jmp 0x4017aa
mov byte [0x40a535], 1
mov dword [0x40a524], 0
push 0x64
call sub.KERNEL32.dll_Sleep
inc dword [0x40a524]
push 0x1000
push dword [0x40a514]
push dword [0x40a520]
call fcn.00403241
mov dword [0x40a528], eax
mov ebx, dword [0x40a528]
cmp ebx, 0xffffffff
jne 0x4015ea
push 1
push str.Login
push 0x14
push 0x78
push 0x14
push 0
push 0
call fcn.00403748
push 1
push str.Connection_Lost
push 0x28
push 0x78
push 0x3c
push 0
push 1
call fcn.00403748
jmp 0x4017aa
mov ebx, dword [0x40a528]
and ebx, ebx
jle 0x4016d2
call fcn.00406660
push eax
push eax
mov edx, str.Logged_in_as_User_
call fcn.00406770
call fcn.00406660
push eax
push eax
push dword [0x40a4fc]
call fcn.004021e0
pop eax
mov edx, 0x409026
call fcn.00406770
call fcn.004067d0
call fcn.00406660
push eax
push eax
push dword [0x40a528]
push dword [0x40a514]
call fcn.00403540
call fcn.00406722
add dword [esp], edx
call fcn.00406722
add dword [esp + 4], edx
call fcn.00402190
call fcn.00406740
and eax, eax
je 0x4016d2
mov ebx, dword [0x40a528]
cmp ebx, 0xffffffff
jne 0x4016c2
push 1
push str.Login
push 0x14
push 0x78
push 0x14
push 0
push 0
call fcn.00403748
push 1
push str.Connection_Lost
push 0x28
push 0x78
push 0x3c
push 0
push 1
call fcn.00403748
jmp 0x4017aa
mov byte [0x40a531], 1
mov byte [0x40a535], 0
jmp 0x4016d2
movsx ebx, byte [0x40a535]
and ebx, ebx
je 0x4016ea
mov ebx, dword [0x40a524]
cmp ebx, 0x32
jg 0x4016ea
jmp 0x4016f1
mov eax, 1
jmp 0x4016f3
xor eax, eax
and eax, eax
je 0x40155f
mov ebx, dword [0x40a524]
cmp ebx, 0x32
jle 0x401758
push 1
push str.Login
push 0x14
push 0x78
push 0x14
push 0
push 0
call fcn.00403748
push 1
push str.Timeout
push 0x28
push 0x78
push 0x3c
push 0
push 1
call fcn.00403748
jmp 0x4017aa
jmp 0x4017aa
push 1
push str.Failed
push 0x14
push 0x78
push 0x14
push 0
push 0
call fcn.00403748
push 1
push str.Socket_Error
push 0x28
push 0x78
push 0x3c
push 0
push 1
call fcn.00403748
movsx ebx, byte [0x40a531]
cmp ebx, 1
jne 0x401b3e
call fcn.00401b9a
mov edx, 0x40900e
lea ecx, [0x40a50c]
call fcn.00402008
push 1
call fcn.0040401f
mov dword [0x40a52c], eax
mov ebx, dword [0x40a52c]
cmp ebx, 0x10
jne 0x401808
mov edx, str.exit
lea ecx, [0x40a50c]
call fcn.00402008
push 0x14
call sub.KERNEL32.dll_Sleep
jmp 0x401b57
push 0x7c
call sub.USER32.DLL_GetAsyncKeyState
mov ebx, eax
and ebx, ebx
je 0x40187e
movsx ebx, byte [0x40a532]
push ebx
xor ebx, ebx
cmp ebx, dword [esp]
jne 0x40184e
call fcn.00406660
push eax
mov edx, str.At__
call fcn.00406770
mov edx, dword [0x40a510]
call fcn.00406770
push 0x40a50c
call fcn.00406680
jmp 0x40187d
mov ebx, 1
cmp ebx, dword [esp]
jne 0x40187d
call fcn.00406660
push eax
mov edx, str.Attribute__pan__at__
call fcn.00406770
mov edx, dword [0x40a510]
call fcn.00406770
push 0x40a50c
call fcn.00406680
pop eax
push 0x7d
call sub.USER32.DLL_GetAsyncKeyState
mov ebx, eax
and ebx, ebx
je 0x4018f4
movsx ebx, byte [0x40a532]
push ebx
xor ebx, ebx
cmp ebx, dword [esp]
jne 0x4018c4
call fcn.00406660
push eax
mov edx, str.At_
call fcn.00406770
mov edx, dword [0x40a510]
call fcn.00406770
push 0x40a50c
call fcn.00406680
jmp 0x4018f3
mov ebx, 1
cmp ebx, dword [esp]
jne 0x4018f3
call fcn.00406660
push eax
mov edx, str.Attribute__pan__at_
call fcn.00406770
mov edx, dword [0x40a510]
call fcn.00406770
push 0x40a50c
call fcn.00406680
pop eax
push 0x7e
call sub.USER32.DLL_GetAsyncKeyState
mov ebx, eax
and ebx, ebx
je 0x40196a
movsx ebx, byte [0x40a532]
push ebx
xor ebx, ebx
cmp ebx, dword [esp]
jne 0x40193a
call fcn.00406660
push eax
mov edx, str.At_
call fcn.00406770
mov edx, dword [0x40a510]
call fcn.00406770
push 0x40a50c
call fcn.00406680
jmp 0x401969
mov ebx, 1
cmp ebx, dword [esp]
jne 0x401969
call fcn.00406660
push eax
mov edx, str.Attribute__tilt__at_
call fcn.00406770
mov edx, dword [0x40a510]
call fcn.00406770
push 0x40a50c
call fcn.00406680
pop eax
push 0x7f
call sub.USER32.DLL_GetAsyncKeyState
mov ebx, eax
and ebx, ebx
je 0x4019e0
movsx ebx, byte [0x40a532]
push ebx
xor ebx, ebx
cmp ebx, dword [esp]
jne 0x4019b0
call fcn.00406660
push eax
mov edx, str.At__
call fcn.00406770
mov edx, dword [0x40a510]
call fcn.00406770
push 0x40a50c
call fcn.00406680
jmp 0x4019df
mov ebx, 1
cmp ebx, dword [esp]
jne 0x4019df
call fcn.00406660
push eax
mov edx, str.Attribute__tilt__at__
call fcn.00406770
mov edx, dword [0x40a510]
call fcn.00406770
push 0x40a50c
call fcn.00406680
pop eax
push pe_nt_image_headers32
call sub.USER32.DLL_GetAsyncKeyState
mov ebx, eax
and ebx, ebx
je 0x401a1c
movsx ebx, byte [0x40a532]
cmp bl, byte [0x40a533]
jge 0x401a10
movsx ebx, byte [0x40a532]
inc ebx
mov eax, ebx
mov byte [0x40a532], al
jmp 0x401a17
mov byte [0x40a532], 0
call fcn.00401b9a
push 0x81
call sub.USER32.DLL_GetAsyncKeyState
mov ebx, eax
and ebx, ebx
je 0x401a53
movsx ebx, byte [0x40a534]
inc ebx
mov eax, ebx
mov byte [0x40a534], al
movsx ebx, byte [0x40a534]
cmp ebx, 1
jle 0x401a4e
mov byte [0x40a534], 0
call fcn.00401b9a
push dword [0x40a50c]
mov edx, 0x40900e
pop ecx
call fcn.00406800
jne 0x401ae4
mov edx, dword [0x40a50c]
call fcn.00406660
push eax
call fcn.00406770
mov edx, 0x4091c1
call fcn.00406770
push 0x40a50c
call fcn.00406680
push dword [0x40a50c]
push dword [0x40a518]
call fcn.00403590
push dword [0x40a50c]
call fcn.004021b0
push eax
push dword [0x40a518]
push dword [0x40a520]
call fcn.004032ad
mov dword [0x40a528], eax
mov ebx, dword [0x40a528]
cmp ebx, 0xffffffff
jne 0x401ada
push str.Powermate_lost_its_connection_to_MA..._Network_problem_
push str.PM_MA_is_exiting...
call fcn.004022a8
jmp 0x401b57
push 0xf
call sub.KERNEL32.dll_Sleep
push dword [0x40a520]
call fcn.0040332d
mov ebx, eax
cmp ebx, 2
jne 0x401b37
push 0x3e8
push dword [0x40a514]
push dword [0x40a520]
call fcn.00403241
mov dword [0x40a528], eax
mov ebx, dword [0x40a528]
cmp ebx, 0xffffffff
jne 0x401b2d
push str.Powermate_lost_its_connection_to_MA..._Network_problem_
push str.PM_MA_is_exiting...
call fcn.004022a8
jmp 0x401b57
mov ebx, dword [0x40a528]
and ebx, ebx
jle 0x401b37
jmp 0x4017bf
push 0x7d0
call sub.KERNEL32.dll_Sleep
push str.PMMA_failed_to_connect_to_your_MA2_console__r_n_r_n_Make_sure_Telnet_Login_is_enabled_in_MA2__SetupConsoleGlobal__r_n_Check_your_IP_address_is_in_the_same_range_as_the_console_r_n_Check_your_consoles_IP_addess_is_correct__127.0.0.1_for_onPC_with_no_network__r_n_Check_your_MA2_login_credentials_are_correct_r_nThen_update_the_setting_in_PMMA.ini_file__in_this_programs_directory__As_appropriate.
push str.Fuck_
call fcn.004022a8
push 0
call 0x401b71
push dword [0x40a4ec]
call sub.KERNEL32.dll_HeapDestroy
call sub.KERNEL32.dll_ExitProcess
call fcn.0040262a
call fcn.004030bd
call fcn.00403480
call fcn.0040366f
call fcn.00403bd3
call fcn.004052b3
call fcn.00405aaa
call fcn.00405bd5
ret