Function at 0x418800
Capabilities:
Log keystrokes via polling

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x45c4d6
push eax
mov eax, dword [esp + 0x10]
mov dword fs:[0], esp
sub esp, 0x128
test eax, eax
push ebx
mov ebx, ecx
jl 0x418b9e
cmp eax, dword [ebx + 0x130]
jge 0x418b9e
mov ecx, dword [ebx + 0x12c]
push ebp
push esi
lea eax, [eax + eax*8]
push edi
lea ebp, [ecx + eax*4]
push 0x10
mov dword [esp + 0x14], ebp
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
mov edx, dword [0x4753e8]
xor edi, edi
mov di, ax
mov eax, dword [ebp + 0xc]
push edx
push eax
and edi, 0x8000
call fcn.00408d60
test eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], 0
je 0x41894b
mov eax, dword [eax]
test eax, eax
je 0x41894b
cmp byte [eax], 0x23
jne 0x41894b
push 0xa
inc eax
push 0
push eax
call fcn.0042dc30
add esp, 0xc
cmp eax, 3
mov dword [esp + 0x18], eax
jne 0x418908
test edi, edi
jne 0x418969
mov ebp, dword [ebp + 0x20]
cmp ebp, dword [ebx + 0xf8]
jge 0x418969
mov ecx, dword [ebx + 0xf4]
mov esi, ebp
imul esi, esi, 0x2c4
mov eax, dword [esi + ecx + 0x294]
test eax, eax
je 0x418969
mov edx, dword [0x4753e8]
mov eax, dword [str.0___ROMHDR]
push edx
push eax
call fcn.00408d60
mov ecx, dword [ebx + 0xf4]
mov ebp, dword [esi + ecx + 0x294]
mov dword [esp + 0x14], eax
mov esi, 0x54
jmp 0x418965
cmp eax, 2
jne 0x41893a
mov ebp, dword [ebp + 0x14]
test ebp, ebp
jl 0x418b9b
cmp ebp, dword [ebx + 0xa8]
jge 0x418b9b
mov eax, dword [ebx + 0xa4]
lea edx, [ebp + ebp*4]
lea ebp, [eax + edx*4]
mov esi, 8
xor edi, edi
jmp 0x418965
cmp eax, 1
jne 0x41894b
lea ebp, [ebx + 0x60]
mov esi, 0x10
xor edi, edi
jmp 0x418965
mov esi, dword [ebp + 8]
test esi, esi
je 0x418b9b
mov ecx, dword [ebp + 4]
push esi
push ecx
lea ecx, [ebx + 0x60]
call fcn.004043a0
mov ebp, eax
test ebp, ebp
jne 0x41897c
push 0
push 0
push str.Error:_bad_address_or_a_part_of_multixip
call fcn.0044bec0
jmp 0x418b9b
test edi, edi
jne 0x418a57
mov eax, dword [esp + 0x14]
test eax, eax
je 0x418a57
call fcn.00402860
mov edx, dword [esp + 0x14]
push eax
push edx
push esi
push ebp
lea ecx, [esp + 0x2c]
call fcn.0042b720
mov dword [esp + 0x140], edi
lea ecx, [esp + 0x1c]
call fcn.0042b860
cmp eax, 5
jne 0x4189ea
mov eax, dword [esp + 0x124]
test eax, eax
je 0x4189d1
push eax
push 0x1a
push edi
mov ecx, ebx
call fcn.004480f0
mov dword [esp + 0x140], 0xffffffff
lea ecx, [esp + 0x1c]
call fcn.00412a70
jmp 0x418b9b
cmp eax, 1
jne 0x4189d1
mov edx, dword [esp + 0x118]
cmp edx, esi
jb 0x4189fc
mov edx, esi
mov esi, dword [esp + 0x114]
mov ecx, edx
mov eax, ecx
shr ecx, 2
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x18]
cmp esi, 3
je 0x418a3e
mov ecx, dword [esp + 0x10]
mov ecx, dword [ecx + 8]
cmp ecx, edx
jbe 0x418a3e
sub ecx, edx
lea edi, [edx + ebp]
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov dword [esp + 0x140], 0xffffffff
lea ecx, [esp + 0x1c]
call fcn.00412a70
jmp 0x418b07
mov edi, dword [esp + 0x10]
mov esi, dword [edi + 8]
call fcn.00402860
push eax
mov eax, dword [edi + 4]
push eax
push esi
push esi
push ebp
lea ecx, [esp + 0x30]
call fcn.0040acf0
mov dword [esp + 0x140], 1
lea ecx, [esp + 0x1c]
call fcn.0040aeb0
cmp eax, 1
je 0x418aa6
mov dword [esp + 0x140], 0xffffffff
lea ecx, [esp + 0x1c]
call fcn.0040add0
jmp 0x418b9b
mov edi, dword [edi + 8]
mov edx, dword [esp + 0x12c]
cmp edx, edi
jb 0x418ab6
mov edx, edi
mov esi, dword [esp + 0x128]
mov ecx, edx
mov eax, ecx
shr ecx, 2
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x10]
mov ecx, dword [ecx + 8]
cmp ecx, edx
jbe 0x418aef
sub ecx, edx
lea edi, [edx + ebp]
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov dword [esp + 0x140], 0xffffffff
lea ecx, [esp + 0x1c]
call fcn.0040add0
mov esi, dword [esp + 0x18]
cmp esi, 1
jne 0x418b17
push 0
push 0
push str.Attention__Critical_changes._Please_save_and_reload_firmware_immediately.
jmp 0x418b89
cmp esi, 2
jne 0x418b8e
mov eax, dword [esp + 0x10]
mov eax, dword [eax + 0x14]
mov edx, dword [ebx + 0xa4]
mov edi, dword [ebx + 0x60]
lea ecx, [eax + eax*4]
lea eax, [edx + ecx*4]
mov ecx, dword [ebx + 0x7c]
mov edx, dword [eax]
lea esi, [ebx + 0x60]
sub ecx, edi
add ecx, edx
mov dword [eax + 0xc], ecx
mov ecx, esi
call fcn.00405390
mov ecx, esi
call fcn.00405730
mov ecx, ebx
mov edi, eax
call fcn.004169a0
mov edx, dword [str.0z4_NUL_]
lea esi, [ebx + 0x128]
push edx
mov ecx, esi
call fcn.00422e70
mov ecx, esi
call fcn.00422c90
push 0
push 0
mov ecx, esi
call fcn.00422f60
test edi, edi
jne 0x418b8e
push edi
push edi
push str.See_log_for_errors.
call fcn.0044bec0
push 0
push 0
push 0
mov ecx, ebx
call fcn.004480f0
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x12c]
pop ebx
mov dword fs:[0], ecx
add esp, 0x134
ret 4