Function at 0x418850
Capabilities:
Log keystrokes via polling

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x45c316
push eax
mov eax, dword [esp + 0x10]
mov dword fs:[0], esp
sub esp, 0x128
test eax, eax
push ebx
mov ebx, ecx
jl 0x418bee
cmp eax, dword [ebx + 0x130]
jge 0x418bee
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 [0x4753d8]
xor edi, edi
mov di, ax
mov eax, dword [ebp + 0xc]
push edx
push eax
and edi, 0x8000
call fcn.00408d90
test eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], 0
je 0x41899b
mov eax, dword [eax]
test eax, eax
je 0x41899b
cmp byte [eax], 0x23
jne 0x41899b
push 0xa
inc eax
push 0
push eax
call fcn.0042da70
add esp, 0xc
cmp eax, 3
mov dword [esp + 0x18], eax
jne 0x418958
test edi, edi
jne 0x4189b9
mov ebp, dword [ebp + 0x20]
cmp ebp, dword [ebx + 0xf8]
jge 0x4189b9
mov ecx, dword [ebx + 0xf4]
mov esi, ebp
imul esi, esi, 0x2c4
mov eax, dword [esi + ecx + 0x294]
test eax, eax
je 0x4189b9
mov edx, dword [0x4753d8]
mov eax, dword [str.0___ROMHDR]
push edx
push eax
call fcn.00408d90
mov ecx, dword [ebx + 0xf4]
mov ebp, dword [esi + ecx + 0x294]
mov dword [esp + 0x14], eax
mov esi, 0x54
jmp 0x4189b5
cmp eax, 2
jne 0x41898a
mov ebp, dword [ebp + 0x14]
test ebp, ebp
jl 0x418beb
cmp ebp, dword [ebx + 0xa8]
jge 0x418beb
mov eax, dword [ebx + 0xa4]
lea edx, [ebp + ebp*4]
lea ebp, [eax + edx*4]
mov esi, 8
xor edi, edi
jmp 0x4189b5
cmp eax, 1
jne 0x41899b
lea ebp, [ebx + 0x60]
mov esi, 0x10
xor edi, edi
jmp 0x4189b5
mov esi, dword [ebp + 8]
test esi, esi
je 0x418beb
mov ecx, dword [ebp + 4]
push esi
push ecx
lea ecx, [ebx + 0x60]
call fcn.00404440
mov ebp, eax
test ebp, ebp
jne 0x4189cc
push 0
push 0
push str.Error:_bad_address_or_a_part_of_multixip
call fcn.0044bd00
jmp 0x418beb
test edi, edi
jne 0x418aa7
mov eax, dword [esp + 0x14]
test eax, eax
je 0x418aa7
call fcn.00402900
mov edx, dword [esp + 0x14]
push eax
push edx
push esi
push ebp
lea ecx, [esp + 0x2c]
call fcn.0042b580
mov dword [esp + 0x140], edi
lea ecx, [esp + 0x1c]
call fcn.0042b6c0
cmp eax, 5
jne 0x418a3a
mov eax, dword [esp + 0x124]
test eax, eax
je 0x418a21
push eax
push 0x1a
push edi
mov ecx, ebx
call fcn.00447f30
mov dword [esp + 0x140], 0xffffffff
lea ecx, [esp + 0x1c]
call fcn.00412a20
jmp 0x418beb
cmp eax, 1
jne 0x418a21
mov edx, dword [esp + 0x118]
cmp edx, esi
jb 0x418a4c
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 0x418a8e
mov ecx, dword [esp + 0x10]
mov ecx, dword [ecx + 8]
cmp ecx, edx
jbe 0x418a8e
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.00412a20
jmp 0x418b57
mov edi, dword [esp + 0x10]
mov esi, dword [edi + 8]
call fcn.00402900
push eax
mov eax, dword [edi + 4]
push eax
push esi
push esi
push ebp
lea ecx, [esp + 0x30]
call fcn.0040ad40
mov dword [esp + 0x140], 1
lea ecx, [esp + 0x1c]
call fcn.0040af00
cmp eax, 1
je 0x418af6
mov dword [esp + 0x140], 0xffffffff
lea ecx, [esp + 0x1c]
call fcn.0040ae20
jmp 0x418beb
mov edi, dword [edi + 8]
mov edx, dword [esp + 0x12c]
cmp edx, edi
jb 0x418b06
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 0x418b3f
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.0040ae20
mov esi, dword [esp + 0x18]
cmp esi, 1
jne 0x418b67
push 0
push 0
push str.Attention__Critical_changes._Please_save_and_reload_firmware_immediately.
jmp 0x418bd9
cmp esi, 2
jne 0x418bde
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.00405430
mov ecx, esi
call fcn.00405780
mov ecx, ebx
mov edi, eax
call fcn.004169f0
mov edx, dword [str.0z4_NUL_]
lea esi, [ebx + 0x128]
push edx
mov ecx, esi
call fcn.00422d00
mov ecx, esi
call fcn.00422b20
push 0
push 0
mov ecx, esi
call fcn.00422df0
test edi, edi
jne 0x418bde
push edi
push edi
push str.See_log_for_errors.
call fcn.0044bd00
push 0
push 0
push 0
mov ecx, ebx
call fcn.00447f30
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x12c]
pop ebx
mov dword fs:[0], ecx
add esp, 0x134
ret 4