Function at 0x40165c
Capabilities:
Accept command line arguments
Check for time delay via gettickcount
Delete file
Print debug messages

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff004
push eax
add esp, 0xfffff4a0
push ebx
push esi
push edi
mov eax, 0x4b3fb4
call fcn.0049df88
mov esi, 0x4b0164
lea edi, [ebp - 0x450]
mov ecx, 0x100
rep movsd dword es:[edi], dword [esi]
mov esi, 0x4b0564
lea edi, [ebp - 0x850]
mov ecx, 0x100
rep movsd dword es:[edi], dword [esi]
call sub.KERNEL32.DLL_GetCommandLineA
push eax
lea eax, [ebp - 0x450]
push eax
call fcn.0049dac8
add esp, 8
push 0x4b36b4
lea edx, [ebp - 0x450]
push edx
call fcn.0049dc09
add esp, 8
mov dword [ebp - 0x3c], eax
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
je 0x401a67
call sub.KERNEL32.DLL_GetCurrentProcessId
mov dword [ebp - 0x40], eax
push 0x4b36ba
call fcn.0040df5c
pop ecx
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x401707
push 4
lea edx, [ebp - 0x40]
push edx
push 0x83000068
push dword [ebp - 0x44]
call fcn.0040e064
add esp, 0x10
push dword [ebp - 0x44]
call sub.KERNEL32.DLL_CloseHandle
push 0x7d0
call sub.KERNEL32.DLL_Sleep
mov esi, 0x4b0964
lea edi, [ebp - 0x954]
mov ecx, 0x41
rep movsd dword es:[edi], dword [esi]
push str.__fe
call fcn.0049daf8
pop ecx
mov edx, dword [ebp - 0x3c]
add eax, edx
push eax
lea eax, [ebp - 0x954]
push eax
call fcn.0049dac8
add esp, 8
mov word [ebp - 0x28], 8
lea edx, [ebp - 0x954]
lea eax, [ebp - 4]
call fcn.004ad754
inc dword [ebp - 0x1c]
mov eax, dword [eax]
call fcn.00484140
push eax
dec dword [ebp - 0x1c]
lea eax, [ebp - 4]
mov edx, 2
call fcn.004ad880
pop ecx
test cl, cl
je 0x401a20
mov dl, 1
mov eax, dword [0x475e28]
call fcn.00401ac4
mov dword [ebp - 0x48], eax
mov word [ebp - 0x28], 0x14
lea edx, [ebp - 0x954]
lea eax, [ebp - 8]
call fcn.004ad754
inc dword [ebp - 0x1c]
mov edx, dword [eax]
mov eax, dword [ebp - 0x48]
mov ecx, dword [eax]
call dword [ecx + 0x68]
dec dword [ebp - 0x1c]
lea eax, [ebp - 8]
mov edx, 2
call fcn.004ad880
mov esi, 0x4b0a68
lea edi, [ebp - 0xd58]
mov ecx, 0x100
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
lea eax, [ebp - 0xd58]
push eax
push dword [0x4af4f8]
push 0x4af1e8
call fcn.0046cd5c
add esp, 0xc
mov esi, 0x4b0e6c
lea edi, [ebp - 0x1158]
mov ecx, 0x100
rep movsd dword es:[edi], dword [esi]
push dword [0x4af4f4]
lea eax, [ebp - 0xd58]
push eax
lea edx, [ebp - 0x1158]
push edx
call fcn.0046ce04
add esp, 0xc
call sub.KERNEL32.DLL_GetTickCount
mov dword [ebp - 0x4c], eax
push str.Encrypting_files_...
call sub.KERNEL32.DLL_OutputDebugStringA
mov esi, 0x4b126c
lea edi, [ebp - 0x1958]
mov ecx, pe_nt_image_headers32
rep movsd dword es:[edi], dword [esi]
xor eax, eax
mov dword [ebp - 0x50], eax
jmp 0x4019d5
mov esi, 0x4b1a6c
lea edi, [ebp - 0x1b60]
mov ecx, 0x82
rep movsd dword es:[edi], dword [esi]
mov word [ebp - 0x28], 0x20
xor eax, eax
mov dword [ebp - 0xc], eax
lea ecx, [ebp - 0xc]
inc dword [ebp - 0x1c]
mov edx, dword [ebp - 0x50]
mov eax, dword [ebp - 0x48]
mov ebx, dword [eax]
call dword [ebx + 0xc]
lea eax, [ebp - 0xc]
lea edx, [ebp - 0x1b60]
mov ecx, 0x103
call fcn.004ad9a8
dec dword [ebp - 0x1c]
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.004ad880
lea ecx, [ebp - 0x1b60]
push ecx
call fcn.0049de00
pop ecx
cmp word [ebp + eax*2 - 0x1b62], 0xa
jne 0x4018cc
lea eax, [ebp - 0x1b60]
push eax
call fcn.0049de00
pop ecx
mov word [ebp + eax*2 - 0x1b62], 0
lea edx, [ebp - 0x1b60]
push edx
call fcn.0049de00
pop ecx
test eax, eax
je 0x4019d2
lea ecx, [ebp - 0x1b60]
push ecx
push str.Encrypting__s_...
lea eax, [ebp - 0x1958]
push eax
call fcn.004a1740
add esp, 0xc
lea edx, [ebp - 0x1958]
push edx
call sub.KERNEL32.DLL_OutputDebugStringW
lea ecx, [ebp - 0x1b60]
push ecx
call fcn.0046cf0c
pop ecx
test eax, eax
jne 0x401945
lea eax, [ebp - 0x1b60]
push eax
push str._s_need_not_to_encrypt.
lea edx, [ebp - 0x1958]
push edx
call fcn.004a1740
add esp, 0xc
lea ecx, [ebp - 0x1958]
push ecx
call sub.KERNEL32.DLL_OutputDebugStringW
jmp 0x4019d2
lea eax, [ebp - 0xd58]
push eax
lea edx, [ebp - 0x1158]
push edx
lea ecx, [ebp - 0x1b60]
push ecx
lea eax, [ebp - 0x1b60]
push eax
call fcn.0046cf9c
add esp, 0x10
test eax, eax
je 0x401996
lea edx, [ebp - 0x1b60]
push edx
push str.Encrypt__s_complete.
lea ecx, [ebp - 0x1958]
push ecx
call fcn.004a1740
add esp, 0xc
lea eax, [ebp - 0x1958]
push eax
call sub.KERNEL32.DLL_OutputDebugStringW
jmp 0x4019d2
lea edx, [ebp - 0x1b60]
push edx
push str.Encrypt__s_fail.
lea ecx, [ebp - 0x1958]
push ecx
call fcn.004a1740
add esp, 0xc
lea eax, [ebp - 0x1958]
push eax
call sub.KERNEL32.DLL_OutputDebugStringW
call sub.KERNEL32.DLL_GetTickCount
mov edx, dword [ebp - 0x4c]
sub eax, edx
cmp eax, 0x7530
jb 0x401908
inc dword [ebp - 0x50]
mov eax, dword [ebp - 0x48]
mov edx, dword [eax]
call dword [edx + 0x14]
mov ecx, dword [ebp - 0x50]
cmp eax, ecx
jg 0x40184c
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x14]
test edx, edx
je 0x401a16
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx]
mov dword [ebp - 0x10], eax
mov word [ebp - 0x28], 0x38
mov edx, 3
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
call dword [ecx - 4]
mov word [ebp - 0x28], 0x2c
push str.Encrypting_files_complete.
call sub.KERNEL32.DLL_OutputDebugStringA
lea edx, [ebp - 0x954]
push edx
call sub.KERNEL32.DLL_DeleteFileA
push 0x4b3799
call fcn.0040df5c
pop ecx
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x401a57
push 4
lea edx, [ebp - 0x40]
push edx
push 0x8300006c
push dword [ebp - 0x44]
call fcn.0040e064
add esp, 0x10
push dword [ebp - 0x44]
call sub.KERNEL32.DLL_CloseHandle
push 0
call fcn.004a81c8
pop ecx
push str.__DecryptFile
lea ecx, [ebp - 0x450]
push ecx
call fcn.0049dc09
add esp, 8
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x401a8d
push 0
call fcn.004a81c8
pop ecx
push str.__DecryptDir
lea edx, [ebp - 0x450]
push edx
call fcn.0049dc09
add esp, 8
mov dword [ebp - 0x3c], eax
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
je 0x401ab3
push 0
call fcn.004a81c8
pop ecx
mov eax, dword [ebp - 0x38]
mov dword fs:[0], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret