Function at 0x50704c
Capabilities:
Get common file path
Log keystrokes via polling
Set current directory

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffbac
push ebx
push esi
push edi
mov ebx, dword [ebp + 0x14]
cmp dword [0x56dcfc], 0
je 0x507072
push 0
call fcn.0042c6cc
xor eax, eax
jmp 0x50775a
mov dword [0x56dcfc], 1
cmp dword [ebp + 8], 0
je 0x5070a6
push dword [ebp + 8]
call sub.USER32.dll_IsWindow
test eax, eax
je 0x5070a6
push dword [ebp + 8]
call sub.USER32.dll_IsIconic
test eax, eax
jne 0x5070a6
push dword [ebp + 8]
call sub.USER32.dll_IsWindowVisible
test eax, eax
jne 0x5070af
mov edx, dword [0x56f018]
mov dword [ebp + 8], edx
push 1
call sub.USER32.dll_GetKeyState
movsx ecx, ax
and ecx, 0x8000
cmp ecx, 0x8000
je 0x5070dd
push 2
call sub.USER32.dll_GetKeyState
movsx eax, ax
and eax, 0x8000
cmp eax, 0x8000
jne 0x507103
lea edx, [ebp - 0x454]
push edx
call sub.USER32.dll_GetKeyboardState
mov byte [ebp - 0x453], 0
mov byte [ebp - 0x452], 0
lea ecx, [ebp - 0x454]
push ecx
call sub.USER32.dll_SetKeyboardState
push 0x1e
push 0x588abf
call fcn.0042e6b1
push 0x180
push 0x588258
call fcn.0042e6b1
push 0x3e7
push 0x5883d8
call fcn.0042e6b1
push 0x180
lea eax, [ebp - 0x188]
push eax
call fcn.0042e6b1
mov edx, dword [ebp + 0x18]
mov dword [0x56dcf0], edx
mov dword [ebp - 8], 1
xor ecx, ecx
mov dword [0x56dcf4], ecx
xor eax, eax
mov dword [0x56dcf8], eax
test ebx, ebx
je 0x50716e
push ebx
push 0x1e
push 0x588abf
call fcn.0042e5e3
cmp dword [ebp + 0xc], 0xa
jl 0x50717d
sub dword [ebp + 0xc], 0xa
xor edx, edx
mov dword [ebp - 8], edx
push 0x180
lea ecx, [ebp - 0x188]
push ecx
call fcn.0042e6b1
push 0x180
lea eax, [ebp - 0x188]
push eax
push 0x13ee
push dword [0x56f014]
call sub.USER32.dll_LoadStringA
lea edx, [ebp - 0x188]
push edx
call fcn.0054e28c
pop ecx
mov dl, byte [ebp + eax - 0x189]
xor esi, esi
lea eax, [ebp - 0x188]
jmp 0x5071ef
cmp dl, cl
jne 0x5071cf
mov byte [eax], 0
cmp esi, 0x104
jb 0x5071ed
xor edx, edx
mov byte [ebp - 0x84], dl
mov byte [ebp - 0x85], dl
mov byte [ebp - 0x86], dl
jmp 0x5071f5
inc esi
inc eax
mov cl, byte [eax]
test cl, cl
jne 0x5071c8
mov esi, 0x588258
mov edi, 0x5887bf
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
xchg edi, esi
mov eax, edi
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0x588ce3
push 0x588be3
push 0x588ae3
push 0x588ae0
push 0x588258
call fcn.0050e5fc
add esp, 0x14
cmp byte [0x588258], 0
je 0x5072e4
mov esi, 0x588258
mov edi, 0x588ae0
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
xchg edi, esi
mov eax, edi
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0x588ae3
push 0x588258
call fcn.0054e1b0
add esp, 8
mov esi, 0x5883d8
mov edi, 0x588be3
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
xchg edi, esi
mov eax, edi
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0x588ce3
push 0x5883d8
call fcn.0054e1b0
add esp, 8
push 0x56dd18
push 0x5883d8
call fcn.0054e450
add esp, 8
test eax, eax
jne 0x5072db
mov dword [ebp - 4], 2
jmp 0x507319
mov dword [ebp - 4], 1
jmp 0x507319
mov esi, 0x588258
mov edi, 0x581f80
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
xchg edi, esi
mov eax, edi
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov byte [0x5883d8], 0
mov dword [ebp - 4], 2
push 0x588ce3
call fcn.0054e28c
pop ecx
cmp eax, 3
jb 0x507397
mov edi, 2
lea esi, [ebp - 0x188]
jmp 0x50738e
mov ebx, esi
jmp 0x50733b
inc ebx
cmp byte [ebx], 0
jne 0x50733a
mov eax, edi
and eax, 0x80000001
jns 0x50734e
dec eax
or eax, 0xfffffffe
inc eax
test eax, eax
je 0x50738a
push 0x588ce3
push esi
call fcn.0042d652
test eax, eax
je 0x50738a
push 0x56dd1d
push 0x588be3
call fcn.0054e450
add esp, 8
test eax, eax
jne 0x50737e
mov byte [0x5883d8], 0
sar edi, 1
jns 0x507385
adc edi, 0
mov dword [ebp - 4], edi
jmp 0x507397
inc edi
mov esi, ebx
inc esi
test esi, esi
je 0x507397
cmp byte [esi], 0
jne 0x507336
push 2
push 0x588258
call fcn.0042cbc2
test eax, eax
jne 0x5073ce
mov esi, 0x588258
mov edi, 0x581f80
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
xchg edi, esi
mov eax, edi
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0x588258
call fcn.0054e28c
pop ecx
mov esi, eax
cmp esi, 3
jbe 0x5073f0
cmp byte [esi + 0x588257], 0x5c
jne 0x5073f0
mov byte [esi + 0x588257], 0
push 0x4c
push 0
lea eax, [ebp - 0x1d4]
push eax
call fcn.0054e10c
add esp, 0xc
cmp dword [ebp + 0xc], 0
jne 0x507486
push dword [ebp + 0x10]
push dword [ebp + 8]
call fcn.00415054
test eax, eax
je 0x507460
mov esi, 0x5887bf
mov edi, 0x588258
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
xchg edi, esi
mov eax, edi
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor eax, eax
mov dword [0x56dcfc], eax
cmp byte [0x5887bf], 0
jne 0x507456
xor eax, eax
jmp 0x50775a
mov eax, 1
jmp 0x50775a
mov esi, 0x56dd20
mov edi, 0x5883d8
mov eax, edi
movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x1a0], 0xa0924
mov dword [ebp - 0x190], 0x508309
jmp 0x507569
cmp dword [ebp + 0xc], 1
je 0x507498
cmp dword [ebp + 0xc], 4
je 0x507498
cmp dword [ebp + 0xc], 5
jne 0x5074c1
mov dword [ebp - 0x1a0], 0xa0824
cmp dword [ebp - 8], 0
je 0x5074b2
or dword [ebp - 0x1a0], 0x1000
mov dword [ebp - 0x190], 0x508309
jmp 0x507569
cmp dword [ebp + 0xc], 2
jne 0x5074f7
mov dword [ebp - 0x18c], 0x14a
mov dword [ebp - 0x1a0], 0xa0a64
cmp dword [ebp - 8], 0
je 0x5074eb
or dword [ebp - 0x1a0], 0x1000
mov dword [ebp - 0x190], 0x507e55
jmp 0x507569
cmp dword [ebp + 0xc], 3
jne 0x50751d
mov dword [0x56dcf4], 1
mov dword [ebp - 0x1a0], 0xa0824
mov dword [ebp - 0x190], 0x508309
jmp 0x507569
cmp dword [ebp + 0xc], 6
jne 0x507553
mov dword [ebp - 0x18c], 0x154
mov dword [ebp - 0x1a0], 0xa0864
cmp dword [ebp - 8], 0
je 0x507547
or dword [ebp - 0x1a0], 0x1000
mov dword [ebp - 0x190], 0x508687
jmp 0x507569
push 0
call fcn.0042c6cc
xor edx, edx
mov dword [0x56dcfc], edx
xor eax, eax
jmp 0x50775a
mov edx, dword [ebp + 0x10]
cmp byte [edx], 0
je 0x50757a
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x1a4], ecx
mov dword [ebp - 0x1d4], 0x4c
mov eax, dword [0x55eff4]
test eax, eax
je 0x507595
mov dword [ebp - 0x1cc], eax
jmp 0x5075a1
mov edx, dword [0x56f014]
mov dword [ebp - 0x1cc], edx
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x1d0], ecx
lea eax, [ebp - 0x188]
mov dword [ebp - 0x1c8], eax
mov edx, dword [ebp - 4]
mov dword [ebp - 0x1bc], edx
mov dword [ebp - 0x1b8], 0x5883d8
mov dword [ebp - 0x1b4], 0x3e7
mov dword [ebp - 0x1a8], 0x588258
lea ecx, [ebp - 0x354]
push ecx
push 0x180
call sub.KERNEL32.dll_GetCurrentDirectoryA
test eax, eax
jne 0x50761a
lea esi, [ebp - 0x354]
mov edi, 0x581f80
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
xchg edi, esi
mov eax, edi
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [ebp - 0x1d4]
push eax
call sub.COMDLG32.dll_GetOpenFileNameA
test eax, eax
je 0x507744
cmp dword [ebp + 0xc], 2
jne 0x5076a4
push 0
push 1
push 0x587aa8
push dword [0x56415c]
call fcn.004c6b3f
test eax, eax
je 0x507651
mov dword [0x56415c], eax
push 0x581e7c
push 0x14
push 0x56dd2f
push str.dccnicks
push dword [0x56415c]
call fcn.004acc74
push 0x587b0c
push 0x180
call sub.KERNEL32.dll_GetCurrentDirectoryA
push 0x587b0c
call fcn.0042e6d8
lea edx, [ebp - 0x354]
push edx
call sub.KERNEL32.dll_SetCurrentDirectoryA
xor ecx, ecx
mov dword [0x56dcfc], ecx
mov eax, 1
jmp 0x50775a
push 0x5c
push dword [ebp - 0x1b8]
call fcn.0054e574
add esp, 8
mov esi, eax
test esi, esi
jne 0x5076cf
push 0
call fcn.0042c6cc
xor eax, eax
mov dword [0x56dcfc], eax
xor eax, eax
jmp 0x50775a
inc esi
cmp dword [ebp + 0xc], 0
je 0x5076fc
push esi
mov edi, esi
mov esi, 0x58893f
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
xchg edi, esi
mov eax, edi
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop esi
mov byte [esi], 0
mov eax, dword [ebp - 0x1b8]
mov esi, 0x5887bf
mov edi, eax
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
xchg edi, esi
mov eax, edi
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [ebp - 0x354]
push eax
call sub.KERNEL32.dll_SetCurrentDirectoryA
xor edx, edx
mov dword [0x56dcfc], edx
mov eax, 1
jmp 0x50775a
lea edx, [ebp - 0x354]
push edx
call sub.KERNEL32.dll_SetCurrentDirectoryA
xor ecx, ecx
mov dword [0x56dcfc], ecx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14