Function at 0x407960
Capabilities:
Create process on windows
Get common file path
Log keystrokes via polling
Set current directory
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x274
cmp dword [0x41d6f0], 0
je 0x40798c
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.0040782c
jmp 0x4082b2
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x274], ecx
cmp dword [ebp - 0x274], 0x14
ja 0x4079dc
cmp dword [ebp - 0x274], 0x14
je 0x40815f
mov edx, dword [ebp - 0x274]
sub edx, 1
mov dword [ebp - 0x274], edx
cmp dword [ebp - 0x274], 0xf
ja case.0x407a25.3
mov ecx, dword [ebp - 0x274]
xor eax, eax
mov al, byte [ecx + 0x4082d4]
jmp dword [eax*4 + 0x4082b8]
cmp dword [ebp - 0x274], 0x113
ja 0x407a2c
cmp dword [ebp - 0x274], 0x113
je 0x407c66
mov edx, dword [ebp - 0x274]
sub edx, 0x1c
mov dword [ebp - 0x274], edx
cmp dword [ebp - 0x274], 0xf6
ja case.0x407a25.3
mov ecx, dword [ebp - 0x274]
xor eax, eax
mov al, byte [ecx + 0x4082f4]
jmp dword [eax*4 + 0x4082e4]
cmp dword [ebp - 0x274], 0x207
ja 0x407a7d
cmp dword [ebp - 0x274], 0x207
je case.0x407a25.1
cmp dword [ebp - 0x274], 0x200
jb case.0x407a25.3
cmp dword [ebp - 0x274], 0x201
jbe case.0x407a25.1
cmp dword [ebp - 0x274], 0x204
je case.0x407a25.1
jmp case.0x407a25.3
cmp dword [ebp - 0x274], 0x311
je 0x40824a
jmp case.0x407a25.3
cmp dword [0x41d6f8], 0
jne 0x407aa2
xor eax, eax
jmp 0x4082b2
jmp case.0x407a25.3
call fcn.00403e32
mov edx, dword [ebp + 8]
mov dword [0x41d6e8], edx
push 0x41d550
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.USER32.dll_GetClientRect]
mov ecx, dword [0x41d558]
sub ecx, dword [0x41d550]
xor edx, edx
cmp ecx, 0x258
setl dl
mov dword [0x41d6f0], edx
mov eax, dword [0x41d6f0]
mov dword [0x41d6f8], eax
mov dword [0x41d7c8], 0x9c4
call fcn.00407800
mov dword [0x411bc4], eax
cmp dword [0x411bc4], 0
jne 0x407b0f
mov byte [0x411a3b], 0
cmp dword [0x41d6f0], 0
je 0x407bd4
movsx ecx, byte [0x411a39]
test ecx, ecx
je 0x407bb2
push str.Audi_LeMans.exe
lea edx, [ebp - 0x110]
push edx
call fcn.0040c0a0
add esp, 8
push 0x411bf8
push 0x2e
lea eax, [ebp - 0x110]
push eax
call fcn.0040c070
add esp, 8
push eax
call fcn.0040c0a0
add esp, 8
push 0
lea ecx, [ebp - 0x110]
push ecx
call fcn.0040ba70
add esp, 8
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x407bad
mov edx, dword [ebp - 0x10]
push edx
movsx eax, byte [0x411a39]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0040b300
add esp, 0xc
test eax, eax
je 0x407bad
mov byte [0x411a3c], 0
mov dword [0x41d6fc], 1
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
call fcn.0040bdf1
movsx edx, byte [0x411a3c]
test edx, edx
je 0x407bcf
push str.PREVIEWB
call fcn.00403530
add esp, 4
mov byte [0x411a3c], al
jmp 0x407c61
push 0
push 0x64
push 0x401
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.USER32.dll_SetTimer]
mov word [0x41d68e], ax
push 0x104
lea edx, [ebp - 0x214]
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x407c10
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 0
call fcn.0040909e
add esp, 4
mov dword [ebp - 4], 0
jmp 0x407c2c
mov ecx, dword [ebp - 4]
add ecx, 1
mov dword [ebp - 4], ecx
cmp dword [ebp - 4], 0x100
jge 0x407c53
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
movsx eax, ax
neg eax
sbb eax, eax
neg eax
mov ecx, dword [ebp - 4]
mov byte [ecx + 0x41de60], al
jmp 0x407c23
push 1
mov edx, dword [ebp + 8]
push edx
call fcn.0040b090
add esp, 8
jmp case.0x407a25.3
cmp dword [0x41d6f0], 0
jne 0x4080d5
cmp dword [0x411bc4], 0
je 0x407eb1
mov dword [0x411bc0], 0
mov dword [0x411bc4], 0
call fcn.0040955d
cmp dword [0x41d6f4], 0
je 0x407cb7
movsx eax, byte [0x411a3b]
test eax, eax
jne 0x407cb7
call fcn.004083eb
jmp 0x407eac
call fcn.00409646
test eax, eax
je 0x407cc5
jmp 0x407eac
call fcn.0040965a
test eax, eax
je 0x407cf2
movsx ecx, byte [0x411a3b]
test ecx, ecx
je 0x407ced
push 1
push 0xa
push 0xa
push 0xffffffffffffff9c
push 0xffffffffffffff9c
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.USER32.dll_MoveWindow]
jmp 0x407eac
push 1
call fcn.0040a0b1
add esp, 4
push 0
call fcn.0040905f
add esp, 4
push 0
call fcn.0040909e
add esp, 4
mov eax, dword [0x41d558]
sub eax, dword [0x41d550]
mov dword [ebp - 0x220], eax
mov ecx, dword [0x41d55c]
sub ecx, dword [0x41d554]
mov dword [ebp - 0x21c], ecx
cmp dword [ebp - 0x220], 0x400
jne 0x407d4b
mov dword [ebp - 0x21c], 0x300
jmp 0x407d79
cmp dword [ebp - 0x220], 0x320
jne 0x407d63
mov dword [ebp - 0x21c], 0x258
jmp 0x407d79
cmp dword [ebp - 0x220], 0x280
jne 0x407d79
mov dword [ebp - 0x21c], 0x1e0
push 0x44
push 0
lea edx, [ebp - 0x264]
push edx
call fcn.0040c210
add esp, 0xc
mov dword [ebp - 0x264], 0x44
mov dword [ebp - 0x254], 0
mov dword [ebp - 0x250], 0
mov eax, dword [ebp - 0x220]
mov dword [ebp - 0x24c], eax
mov ecx, dword [ebp - 0x21c]
mov dword [ebp - 0x248], ecx
mov word [ebp - 0x234], 3
mov dword [ebp - 0x238], 7
mov eax, dword [ebp - 0x220]
sub eax, 0x1bc
cdq
sub eax, edx
sar eax, 1
sub eax, 7
mov dword [ebp - 0x254], eax
mov eax, dword [ebp - 0x21c]
sub eax, 0x114
cdq
sub eax, edx
sar eax, 1
sub eax, 0x2c
mov dword [ebp - 0x250], eax
mov dword [ebp - 0x238], 4
mov dword [ebp - 0x238], 0
push 1
push str.Audi_LeMans.exe
call fcn.0040ba70
add esp, 8
mov dword [ebp - 0x218], eax
cmp dword [ebp - 0x218], 0
jne 0x407e40
call fcn.004083eb
jmp 0x407eac
push 0x41df60
lea edx, [ebp - 0x264]
push edx
push 0
push 0
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 0x218]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x407e72
call fcn.004083eb
jmp 0x407eac
mov ecx, dword [0x41df60]
mov dword [0x41d6a8], ecx
push 0x20
mov edx, dword [0x41d6a8]
push edx
call dword [sym.imp.KERNEL32.dll_SetPriorityClass]
movsx eax, byte [0x411a3b]
test eax, eax
je 0x407eac
push 1
push 0xa
push 0xa
push 0xffffffffffffff9c
push 0xffffffffffffff9c
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.USER32.dll_MoveWindow]
jmp 0x4080d5
call fcn.00407800
test eax, eax
jne 0x407ed0
mov edx, dword [ebp + 8]
push edx
call fcn.00408ddd
add esp, 4
call fcn.0040917c
jmp 0x4080d5
mov eax, dword [0x41d6e4]
add eax, 1
mov dword [0x41d6e4], eax
call fcn.004095cb
call fcn.00409b23
mov dword [ebp - 8], eax
cmp dword [0x41d708], 0
jne 0x407f57
mov ecx, dword [ebp - 8]
mov dword [0x41d708], ecx
cmp dword [ebp - 8], 0
je 0x407f32
call fcn.00405f70
mov dword [0x41d704], 0xa
mov edx, dword [0x41d708]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.004094e9
add esp, 8
mov ecx, dword [ebp - 8]
push ecx
call fcn.00406340
add esp, 4
jmp 0x407f52
mov edx, dword [0x41d700]
add edx, 1
mov dword [0x41d700], edx
cmp dword [0x41d700], 0xc8
jne 0x407f52
call fcn.004083eb
jmp 0x4080d5
call fcn.0040943b
test eax, eax
je 0x407f6a
call fcn.004083eb
jmp 0x4080d5
cmp dword [0x41d704], 5
jne 0x407f8a
call fcn.0040a04a
mov eax, dword [0x41d704]
sub eax, 1
mov dword [0x41d704], eax
jmp 0x4080d5
mov ecx, dword [0x41d704]
sub ecx, 1
mov dword [0x41d704], ecx
cmp dword [0x41d704], 0
jne 0x407fc0
push 0
call fcn.0040905f
add esp, 4
mov edx, dword [0x41d708]
push edx
call fcn.0040a0da
add esp, 4
jmp 0x4080d5
mov eax, dword [0x41d704]
push eax
call fcn.0040a23c
add esp, 4
test eax, eax
je 0x407fd7
jmp 0x4080d5
call fcn.0040a198
push 1
call fcn.00409f4b
add esp, 4
test eax, eax
je 0x407fef
jmp 0x4080d0
call fcn.00409eb5
test eax, eax
je 0x408007
push 8
call fcn.004092e6
add esp, 4
jmp 0x4080d0
cmp dword [0x41d6c0], 0
je 0x40801a
call fcn.00409cee
jmp 0x4080d0
call fcn.0040a0b6
test eax, eax
je 0x408028
jmp 0x4080d0
cmp dword [0x41d6e0], 0
je 0x408096
mov ecx, dword [0x41d6e0]
add ecx, 1
mov dword [0x41d6e0], ecx
cmp dword [0x41d6e0], 4
jl 0x408094
mov dword [ebp - 0x268], 0
lea edx, [ebp - 0x268]
push edx
mov eax, dword [0x41d708]
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov ecx, dword [ebp - 0x268]
push ecx
push 0
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x26c], eax
push 0
mov edx, dword [ebp - 0x26c]
push edx
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
call fcn.004083eb
jmp 0x4080d0
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov dword [ebp - 0x270], eax
mov eax, dword [ebp - 0x270]
cmp eax, dword [0x41d708]
je 0x4080d0
mov ecx, dword [ebp - 0x270]
push ecx
call fcn.0040a0c8
add esp, 4
test eax, eax
jne 0x4080d0
mov edx, dword [0x41d708]
push edx
call dword [sym.imp.USER32.dll_SetForegroundWindow]
call fcn.0040917c
jmp case.0x407a25.3
mov dword [0x41d6ec], 1
xor eax, eax
mov ax, word [0x41d68e]
test eax, eax
je 0x408108
push 0x401
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.USER32.dll_KillTimer]
mov word [0x41d68e], 0
call fcn.004037eb
cmp dword [0x41d708], 0
je 0x408129
call fcn.00409b23
test eax, eax
je 0x408129
push 8
call fcn.004092e6
add esp, 4
cmp dword [0x41d6f0], 0
jne 0x40815a
call fcn.00406002
push 0
call fcn.0040a0b1
add esp, 4
push 1
call fcn.0040905f
add esp, 4
push 1
call fcn.0040909e
add esp, 4
call fcn.004043b0
jmp case.0x407a25.3
cmp dword [0x41d6f0], 0
je 0x4081c6
cmp dword [0x41d05c], 0
je 0x40818e
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.USER32.dll_GetDC]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.USER32.dll_ReleaseDC]
jmp 0x4081c4
mov eax, dword [0x41d55c]
sub eax, dword [0x41d554]
sub eax, 0x20
cdq
sub eax, edx
sar eax, 1
push eax
mov eax, dword [0x41d558]
sub eax, dword [0x41d550]
sub eax, 0x20
cdq
sub eax, edx
sar eax, 1
push eax
push 0x65
mov edx, dword [ebp + 8]
push edx
call fcn.00408d51
add esp, 0x10
jmp 0x408202
call fcn.00407800
test eax, eax
jne 0x408202
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.USER32.dll_GetDC]
mov dword [ebp - 0xc], eax
push 4
call dword [sym.imp.GDI32.dll_GetStockObject]
push eax
push 0x41d550
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.USER32.dll_FillRect]
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.USER32.dll_ReleaseDC]
xor eax, eax
jmp 0x4082b2
mov ecx, dword [0x41d7bc]
mov dword [0x41d6f4], ecx
mov eax, 1
jmp 0x4082b2
mov eax, 1
jmp 0x4082b2
cmp dword [0x41d6c0], 0
jne 0x408248
cmp dword [0x41d708], 0
je 0x408248
mov edx, dword [0x41d708]
push edx
call dword [sym.imp.USER32.dll_SetForegroundWindow]
jmp case.0x407a25.3
mov eax, dword [ebp + 0x10]
cmp eax, dword [ebp + 8]
je 0x408269
cmp dword [0x41d05c], 0
je 0x408269
push 1
push 0
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.USER32.dll_InvalidateRect]
jmp case.0x407a25.3
mov edx, dword [ebp + 8]
push edx
call fcn.0040360e
add esp, 4
test eax, eax
je 0x408282
mov eax, 1
jmp 0x4082b2
jmp case.0x407a25.3
cmp dword [ebp + 0x10], 0xf170
jne case.0x407a25.3
cmp dword [ebp + 0x14], 0xffffffff
je case.0x407a25.3
mov dword [0x411690], 1
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.0040a635
mov esp, ebp
pop ebp
ret 0x10