Function at 0x40d540
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 0x3e8
push ebx
push ebp
mov ebp, dword [esp + 0x3f4]
push esi
xor ebx, ebx
push edi
lea eax, [esp + 0x10]
push ebx
push eax
push ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], ebx
mov dword [0x4439d4], ebp
xor edi, edi
call sub.DDRAW.dll_DirectDrawCreate
mov esi, dword [sym.imp.USER32.dll_MessageBoxA_1]
test eax, eax
jl 0x40d5f9
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x20]
push edx
push 0x421f38
mov ecx, dword [eax]
push eax
call dword [ecx]
test eax, eax
jl 0x40d5a5
mov edi, 1
mov eax, dword [esp + 0x20]
cmp eax, ebx
je 0x40d5b7
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [esp + 0x20], ebx
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x40d5c9
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov dword [esp + 0x10], ebx
cmp edi, 1
je 0x40d615
push 0x32
push str.DirectX_Init
push 0x4252f0
push ebp
call esi
cmp eax, 3
je 0x40d608
cmp eax, 4
jne 0x40d615
lea eax, [esp + 0x10]
push ebx
push eax
push ebx
xor edi, edi
call sub.DDRAW.dll_DirectDrawCreate
test eax, eax
jge 0x40d589
push 0x10
push str.DirectX_Init
push 0x4252d8
push ebp
call esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x3e8
ret
push 0x11
call dword [sym.imp.USER32.dll_GetKeyState]
mov ecx, dword [0x42c168]
mov edi, dword [esp + 0x3fc]
mov ebp, 0x1e0
mov ebx, 0x280
push ebp
push ebx
push ecx
push edi
call fcn.0040e270
mov edx, dword [0x429fe4]
push edx
push edi
call fcn.0040e360
add esp, 0x18
cmp eax, 1
jne 0x40de5a
mov eax, dword [0x44bef8]
push 0
push 0x44bf0c
push eax
mov ecx, dword [eax]
call dword [ecx + 0x18]
test eax, eax
jge 0x40d67d
push 0x10
push str.DirectX_Init
push str.Viewport
jmp 0x40de50
mov eax, dword [0x44bf08]
mov edx, dword [0x44bf0c]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
test eax, eax
jge 0x40d6ac
mov eax, dword [esp + 0x3fc]
push 0x10
push str.DirectX_Init
push 0x4252a8
push eax
jmp 0x40de58
mov ecx, 0xb
xor eax, eax
lea edi, [esp + 0x28]
lea edx, [esp + 0x28]
rep stosd dword es:[edi], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x4c], eax
mov eax, dword [0x44bf0c]
mov dword [esp + 0x28], 0x2c
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebp
mov dword [esp + 0x3c], 0xbf800000
mov dword [esp + 0x40], 0x3f400000
mov dword [esp + 0x44], 0x40000000
mov dword [esp + 0x48], 0x3fc00000
mov dword [esp + 0x50], 0x3f800000
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x44]
test eax, eax
jge 0x40d72a
mov eax, dword [esp + 0x3fc]
push 0x10
push str.DirectX_Init
push 0x425290
push eax
jmp 0x40de58
mov eax, dword [0x44bf08]
mov edx, dword [0x44bf0c]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x30]
test eax, eax
jge 0x40d759
mov eax, dword [esp + 0x3fc]
push 0x10
push str.DirectX_Init
push 0x425278
push eax
jmp 0x40de58
lea ecx, [esp + 0x1c]
xor edi, edi
push ecx
mov dword [0x4365b0], edi
mov dword [0x4365b4], edi
mov dword [0x4365b8], ebx
mov dword [0x4365bc], ebp
call sub.d3drm.dll_Direct3DRMCreate
test eax, eax
je 0x40d792
push 0x10
push str.DirectX_Init
push str.Direct3DRM
jmp 0x40de50
mov eax, dword [esp + 0x1c]
push 0x44bf14
push 0x421618
push eax
mov ecx, dword [eax]
call dword [ecx]
test eax, eax
jge 0x40d7ba
push 0x10
push str.DirectX_Init
push str.Direct3DRM3
jmp 0x40de50
mov eax, dword [esp + 0x1c]
cmp eax, edi
je 0x40d7cc
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [esp + 0x1c], edi
mov eax, dword [0x44bef8]
lea ecx, [esp + 0x18]
push ecx
push 0x421d48
mov edx, dword [eax]
push eax
call dword [edx]
test eax, eax
jge 0x40d7f5
push 0x10
push str.DirectX_Init
push str.Direct3D2
jmp 0x40de50
mov eax, dword [0x44bf08]
lea edx, [esp + 0x14]
push edx
push 0x421c98
mov ecx, dword [eax]
push eax
call dword [ecx]
test eax, eax
jge 0x40d826
mov eax, dword [esp + 0x3fc]
push 0x10
push str.DirectX_Init
push str.Direct3DDevice2
push eax
jmp 0x40de58
mov edx, dword [esp + 0x14]
mov eax, dword [0x44bf14]
push 0x44bf18
push edx
mov edx, dword [esp + 0x20]
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x40]
test eax, eax
jge 0x40d85d
mov eax, dword [esp + 0x3fc]
push 0x10
push str.DirectX_Init
push str.Direct3DRMDevice3
push eax
jmp 0x40de58
mov eax, dword [esp + 0x14]
cmp eax, edi
je 0x40d86f
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [esp + 0x14], edi
mov eax, dword [esp + 0x18]
cmp eax, edi
je 0x40d881
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov dword [esp + 0x18], edi
mov eax, dword [0x44bf18]
push 2
push eax
mov ecx, dword [eax]
call dword [ecx + 0x44]
test eax, eax
jge 0x40d8a3
push 0x10
push str.DirectX_Init
push str.SetBufferCount_
jmp 0x40de50
mov eax, dword [0x44bf14]
push 0x44bf1c
push edi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x10]
test eax, eax
jge 0x40d8c9
push 0x10
push str.DirectX_Init
push 0x4251c4
jmp 0x40de50
mov eax, dword [0x44bf14]
mov edx, dword [0x44bf1c]
push 0x44bf20
push edx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x10]
test eax, eax
jl 0x40de44
mov eax, dword [0x44bf14]
mov edx, dword [0x44bf20]
push 0x44bf24
push edx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x10]
test eax, eax
jl 0x40de44
mov eax, dword [0x44bf14]
mov edx, dword [0x44bf1c]
push 0x44bf28
push edx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x10]
test eax, eax
jl 0x40de44
mov eax, dword [0x44bf14]
mov edx, dword [0x44bf28]
push 0x44bf2c
push edx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x10]
test eax, eax
jl 0x40de44
mov eax, dword [0x44bf14]
mov edx, dword [0x44bf2c]
push 0x44bf30
push edx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x10]
test eax, eax
jl 0x40de44
mov eax, dword [0x44bf20]
mov edx, dword [0x44bf1c]
push edi
push edi
mov dword [0x4365f0], 0
mov dword [0x4365f4], 0
mov dword [0x4365e8], 0
mov ecx, dword [eax]
push edi
push edx
push eax
call dword [ecx + pe_nt_image_headers32]
mov eax, dword [0x44bf20]
mov edx, dword [0x44bf1c]
push edi
push 0x3f800000
mov ecx, dword [eax]
push edi
push 0x3f800000
push edi
push edi
push edx
push eax
call dword [ecx + 0xec]
mov edx, dword [0x44bf20]
mov eax, dword [0x44bf14]
push 0x44bf34
push ebp
mov ecx, dword [eax]
push ebx
push edi
push edi
push edx
mov edx, dword [0x44bf18]
push edx
push eax
call dword [ecx + 0x50]
test eax, eax
jge 0x40d9fc
mov eax, dword [esp + 0x3fc]
push 0x10
push str.DirectX_Init
push str.DIRECT3DRMVIEWPORT2
push eax
jmp 0x40de58
mov eax, dword [0x44bf34]
push 0x447a0000
push eax
mov ecx, dword [eax]
call dword [ecx + 0x3c]
mov eax, dword [0x44bf34]
push 0x3f800000
push eax
mov edx, dword [eax]
call dword [edx + 0x38]
mov eax, dword [0x44bf34]
mov dword [0x443be8], 0x41f00000
push 0x3f060a92
push eax
mov ecx, dword [eax]
call dword [ecx + 0x40]
mov eax, dword [0x44bf34]
push 0x3f000000
push 0xbf000000
push 0x3f000000
mov edx, dword [eax]
push 0xbf000000
push eax
call dword [edx + 0x60]
test eax, eax
jge 0x40da72
mov eax, dword [esp + 0x3fc]
push 0x10
push str.DirectX_Init
push str.lpRMVP2__SetPlane___
push eax
jmp 0x40de58
mov eax, dword [0x44bf14]
push 0x44bf38
push 0x3dcccccd
push 0x3dcccccd
mov ecx, dword [eax]
push 0x3dcccccd
push edi
push eax
call dword [ecx + 0x30]
test eax, eax
jge 0x40daa7
push 0x10
push str.DirectX_Init
push 0x425170
jmp 0x40de50
mov eax, dword [0x44bf1c]
mov edx, dword [0x44bf38]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x30]
mov eax, dword [0x44bf14]
push 0x44bf3c
push 0x3f666666
push 0x3f666666
mov ecx, dword [eax]
push 0x3f666666
push 3
push eax
call dword [ecx + 0x30]
test eax, eax
jge 0x40daef
push 0x10
push str.DirectX_Init
push 0x42515c
jmp 0x40de50
mov eax, dword [0x44bf24]
mov edx, dword [0x44bf3c]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x30]
mov edx, dword [0x434db0]
push edi
mov eax, dword [0x44bf24]
push 0x3f800000
push edi
push edx
mov edx, dword [0x434dac]
mov ecx, dword [eax]
push edx
mov edx, dword [0x434da8]
push edx
mov edx, dword [0x44bf20]
push edx
push eax
call dword [ecx + 0xec]
mov eax, dword [0x44bf18]
push 0x89
push eax
mov ecx, dword [eax]
call dword [ecx + 0x54]
mov eax, dword [0x44bf18]
push edi
push 1
push 0x16
mov edx, dword [eax]
push eax
call dword [edx + 0xa0]
mov eax, dword [0x44bef4]
push edi
push 0x44bf10
push edi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x10]
test eax, eax
jl 0x40db93
mov eax, dword [0x44bf10]
mov ecx, dword [esp + 0x3fc]
push ecx
push edi
mov edx, dword [eax]
push eax
call dword [edx + 0x20]
mov eax, dword [0x44befc]
mov ecx, dword [0x44bf10]
push ecx
push eax
mov edx, dword [eax]
call dword [edx + 0x70]
jmp 0x40db99
mov dword [0x44bf10], edi
cmp dword [0x42c168], 1
je 0x40dbbb
cmp dword [0x44bf10], edi
jne 0x40dbbb
push 0x10
push str.DirectX_Init
push 0x425148
jmp 0x40de50
mov edi, 0x434db4
mov esi, 0x44388c
mov eax, dword [0x44bef4]
push 0
push esi
push edi
mov ecx, dword [eax]
push 0x404
push eax
call dword [ecx + 0x14]
test eax, eax
jl 0x40de5a
add esi, 4
add edi, 0x40
cmp esi, 0x4439cc
jl 0x40dbc5
mov edi, 0x434db4
mov esi, 0x42caa8
mov eax, dword [0x44bef4]
push 0
push esi
push edi
mov edx, dword [eax]
push 0x404
push eax
call dword [edx + 0x14]
test eax, eax
jl 0x40de5a
add esi, 4
add edi, 0x400
cmp esi, 0x42cabc
jl 0x40dbf9
mov ecx, 0x19
xor eax, eax
lea edi, [esp + 0x54]
lea edx, [esp + 0x54]
rep stosd dword es:[edi], eax
mov eax, dword [0x44befc]
push edx
xor edi, edi
push 0x1000400
push edi
mov dword [esp + 0x60], 0x64
mov ecx, dword [eax]
push edi
push edi
push eax
call dword [ecx + 0x14]
mov eax, dword [0x44bf00]
lea edx, [esp + 0x54]
push edx
push 0x1000400
mov ecx, dword [eax]
push edi
push edi
push edi
push eax
call dword [ecx + 0x14]
mov eax, dword [0x44bf0c]
push edi
push 0x3f800000
push edi
mov ecx, dword [eax]
push 3
mov ebx, 1
push 0x4365b0
push ebx
push eax
call dword [ecx + 0x50]
mov eax, dword [0x44bf08]
push eax
mov edx, dword [eax]
call dword [edx + 0x24]
call fcn.0040b350
mov eax, dword [0x44bf08]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x28]
mov eax, dword [0x44bf14]
push 0x443c04
push eax
mov edx, dword [eax]
call dword [edx + 0x64]
mov eax, dword [0x44bf28]
mov edx, dword [0x44bf1c]
push edi
push edi
mov ecx, dword [eax]
push edi
push edx
push eax
call dword [ecx + pe_nt_image_headers32]
mov eax, dword [0x44bf28]
mov edx, dword [0x44bf1c]
push edi
push 0x3f800000
mov ecx, dword [eax]
push edi
push 0x3f800000
push edi
push edi
push edx
push eax
call dword [ecx + 0xec]
mov eax, dword [0x44bf2c]
mov edx, dword [0x44bf28]
push edi
push edi
mov ecx, dword [eax]
push edi
push edx
push eax
call dword [ecx + pe_nt_image_headers32]
mov eax, dword [0x44bf2c]
mov edx, dword [0x44bf28]
push edi
push 0x3f800000
mov ecx, dword [eax]
push edi
push 0x3f800000
push edi
push edi
push edx
push eax
call dword [ecx + 0xec]
push str.STCAM.BIN
push str.DATA_
lea eax, [esp + 0x200]
push 0x443ad8
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA_1]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA_1]
push eax
call esi
push eax
call esi
lea ecx, [esp + 0xb8]
lea edx, [esp + 0x1f8]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA_1]
cmp eax, 0xffffffff
je 0x40de38
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [esp + 0xd8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GlobalAlloc_1]
cmp eax, edi
mov dword [0x443884], eax
je 0x40ddf8
lea ecx, [esp + 0x1f8]
push 0x424aa4
push ecx
call fcn.00413c38
mov esi, eax
add esp, 8
cmp esi, edi
je 0x40ddf8
mov edx, dword [esp + 0xd8]
mov eax, dword [0x443884]
push esi
push ebx
push edx
push eax
call fcn.00413fc1
add esp, 0x10
cmp eax, ebx
push esi
jne 0x40ddf0
call fcn.00413a03
mov ecx, dword [0x443884]
push ecx
call fcn.0040ded0
add esp, 8
cmp eax, ebx
jne 0x40ddf8
mov dword [esp + 0x24], ebx
mov dword [0x436a30], ebx
jmp 0x40de5a
call fcn.00413a03
add esp, 4
mov eax, dword [0x443ecc]
cmp eax, edi
je 0x40de0d
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov dword [0x443ecc], edi
mov eax, dword [0x443880]
cmp eax, edi
je 0x40de22
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [0x443880], edi
mov eax, dword [0x443884]
cmp eax, edi
je 0x40de38
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree_1]
mov dword [0x443884], edi
mov dword [esp + 0x24], ebx
mov dword [0x436a30], ebx
jmp 0x40de5a
push 0x10
push str.DirectX_Init
push 0x425134
mov edx, dword [esp + 0x408]
push edx
call esi
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40de68
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40de76
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40de84
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [esp + 0x20]
test eax, eax
je 0x40de92
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40dea0
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov esi, dword [esp + 0x24]
cmp esi, 1
je 0x40deb9
mov edx, dword [esp + 0x3fc]
push edx
call fcn.0040cec0
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3e8
ret