Function at 0x403141
Capabilities:
Accept command line arguments
Check for time delay via gettickcount
Get file size
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe0
pushal
pushfd
push ecx
ror ecx, 2
pop ecx
pushal
call sub.KERNEL32.DLL_GetCurrentProcess
popal
popfd
psllw mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetLastError
popfd
popal
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push dword [ebp + 8]
call sub.KERNEL32.DLL_CreateFileA
inc eax
je 0x4037c3
mov ebx, eax
pushfd
push ecx
btr ecx, 0x1f
pop ecx
pushal
call sub.KERNEL32.DLL_GetTickCount
popal
popfd
fsubp st(1)
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentThreadId
popfd
popal
push 0
push ebx
call sub.KERNEL32.DLL_GetFileSize
pushfd
push ebx
sar ebx, 0xc
pop ebx
pushal
call sub.KERNEL32.DLL_GetLastError
popal
popfd
push edx
push eax
pushfd
add edx, eax
popfd
pop eax
pop edx
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentProcess
popfd
popal
or eax, eax
je 0x40379a
pushfd
push ebx
sar ebx, 0xd
pop ebx
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
mov dword [ebp - 4], eax
push 0
push 0
push 0
push 2
push 0
push ebx
call sub.KERNEL32.DLL_CreateFileMappingA
mov esi, eax
pushfd
push esi
bt esi, 0xc
pop esi
pushal
call sub.KERNEL32.DLL_GetTickCount
popal
popfd
paddsw mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetLastError
popfd
popal
push 0
push 0
push 0
push 4
push esi
call sub.KERNEL32.DLL_MapViewOfFile
mov edi, eax
pushfd
push eax
shl eax, 0x16
pop eax
pushal
call sub.KERNEL32.DLL_GetCommandLineA
popal
popfd
push edx
push eax
pushfd
test eax, edx
popfd
pop eax
pop edx
pushal
pushfd
call sub.KERNEL32.DLL_GetCommandLineA
popfd
popal
mov dword [ebp - 0x20], eax
pushfd
push eax
btr eax, 0x1e
pop eax
pushal
call sub.KERNEL32.DLL_GetCommandLineA
popal
popfd
pushfd
push ecx
setbe cl
pop ecx
pushal
call sub.KERNEL32.DLL_GetCurrentProcess
popal
popfd
or eax, eax
pushfd
push edx
shl edx, 0
pop edx
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
pushfd
push eax
setb al
pop eax
pushal
call sub.KERNEL32.DLL_GetLastError
popal
popfd
je 0x40379a
inc edi
pushfd
push eax
rcl eax, 0xf
pop eax
pushal
call sub.KERNEL32.DLL_GetCurrentProcess
popal
popfd
paddw mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentProcessId
popfd
popal
pushal
pushfd
push ecx
bts ecx, 9
pop ecx
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
push ebx
push ebx
pushfd
and ebx, ebx
popfd
pop ebx
pop ebx
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentThread
popfd
popal
mov ecx, dword [ebp - 4]
mov eax, edi
sub eax, dword [ebp - 0x20]
pushfd
push esi
rcl esi, 1
pop esi
pushal
call sub.KERNEL32.DLL_GetCurrentThread
popal
popfd
fnclex
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentProcess
popfd
popal
sub eax, dword [ebp - 4]
neg eax
mov ecx, eax
pushfd
push esi
shl esi, 0x17
pop esi
pushal
call sub.KERNEL32.DLL_GetLastError
popal
popfd
pushfd
push ebx
setae bl
pop ebx
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
mov al, pe_nt_image_headers32
mov edx, edi
pushfd
push eax
rol eax, 4
pop eax
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
pmulhw mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentThread
popfd
popal
repne scasb al, byte es:[edi]
pushfd
push ebx
rcl ebx, 7
pop ebx
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
or ecx, ecx
je 0x403759
pushfd
push esi
ror esi, 0x12
pop esi
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
push eax
push edx
pushfd
mov eax, edx
popfd
pop edx
pop eax
pushal
pushfd
call sub.KERNEL32.DLL_GetCommandLineA
popfd
popal
mov eax, edi
sub eax, edx
pushfd
push esi
shl esi, 0xa
pop esi
pushal
call sub.KERNEL32.DLL_GetCurrentProcessId
popal
popfd
push eax
push ecx
pushfd
cmovbe eax, ecx
popfd
pop ecx
pop eax
pushal
pushfd
call sub.KERNEL32.DLL_GetCommandLineA
popfd
popal
dec eax
pushfd
push ecx
bts ecx, 0x18
pop ecx
pushal
call sub.KERNEL32.DLL_GetCommandLineA
popal
popfd
frndint
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentProcess
popfd
popal
dec eax
mov dword [ebp - 0x14], eax
mov edx, edi
dec edi
dec edi
mov dword [ebp - 0x18], edi
jmp 0x4033ad
dec edi
cmp dword [ebp - 0x14], 0
jbe 0x4033ab
dec dword [ebp - 0x14]
jmp 0x4033ad
jmp 0x4033df
cmp byte [edi], 0x40
jbe 0x4033b7
cmp byte [edi], 0x5b
jb 0x40339f
cmp byte [edi], 0x2f
jbe 0x4033c1
cmp byte [edi], 0x3a
jb 0x40339f
cmp byte [edi], 0x60
jbe 0x4033cb
cmp byte [edi], 0x7b
jb 0x40339f
cmp byte [edi], 0x5f
je 0x40339f
cmp byte [edi], 0x2e
je 0x40339f
cmp byte [edi], 0x2b
je 0x40339f
cmp byte [edi], 0x2d
je 0x40339f
pushfd
push ebx
bt ebx, 0x17
pop ebx
pushal
call sub.KERNEL32.DLL_GetCurrentThread
popal
popfd
pushfd
push ecx
setae cl
pop ecx
pushal
call sub.KERNEL32.DLL_GetCurrentThread
popal
popfd
cmp dword [ebp - 0x18], edi
je 0x403759
pushfd
push edx
btc edx, 0xd
pop edx
pushal
call sub.KERNEL32.DLL_GetCurrentProcessId
popal
popfd
push edx
call fcn.0040393f
pop edx
jmp 0x403433
inc edi
mov dword [ebp - 8], edi
pushfd
push eax
btc eax, 0xa
pop eax
pushal
call sub.KERNEL32.DLL_GetCurrentProcess
popal
popfd
push esi
push ecx
pushfd
cmovns esi, ecx
popfd
pop ecx
pop esi
pushal
pushfd
call sub.KERNEL32.DLL_GetCommandLineA
popfd
popal
mov edi, edx
pushfd
push edx
bt edx, 0x19
pop edx
pushal
call sub.KERNEL32.DLL_GetCurrentProcessId
popal
popfd
push ebx
push ecx
pushfd
cmovae ebx, ecx
popfd
pop ecx
pop ebx
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentThread
popfd
popal
mov dword [ebp - 0x1c], edi
jmp 0x4034b0
pushfd
push eax
btr eax, 0
pop eax
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
push edx
call fcn.0040393f
pop edx
jmp 0x4034ae
inc edi
dec ecx
cmp byte [edi], 0x40
jbe 0x4034ba
cmp byte [edi], 0x5b
jb 0x403480
cmp byte [edi], 0x2f
jbe 0x4034c4
cmp byte [edi], 0x3a
jb 0x403480
cmp byte [edi], 0x60
jbe 0x4034ce
cmp byte [edi], 0x7b
jb 0x403480
cmp byte [edi], 0x5f
je 0x403480
cmp byte [edi], 0x2e
je 0x403480
cmp byte [edi], 0x2b
je 0x403480
cmp byte [edi], 0x2d
je 0x403480
pushfd
push esi
ror esi, 1
pop esi
pushal
call sub.KERNEL32.DLL_GetLastError
popal
popfd
push edx
push eax
pushfd
cmovl edx, eax
popfd
pop eax
pop edx
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentThread
popfd
popal
cmp dword [ebp - 0x1c], edi
je 0x403759
pushfd
push eax
rol eax, 0
pop eax
pushal
call sub.KERNEL32.DLL_GetCurrentThread
popal
popfd
push edx
call fcn.0040393f
pop edx
jmp 0x403537
sub edi, 4
pushfd
push esi
shl esi, 0x1a
pop esi
pushal
call sub.KERNEL32.DLL_GetTickCount
popal
popfd
cmp dword [ebp - 0x1c], edi
jle 0x403555
add edi, 4
jmp 0x403759
add edi, 4
dec edi
pushfd
push esi
btr esi, 0x13
pop esi
pushal
call sub.KERNEL32.DLL_GetCommandLineA
popal
popfd
pushfd
push ecx
setp cl
pop ecx
pushal
call sub.KERNEL32.DLL_GetCurrentThread
popal
popfd
sub edi, dword [ebp - 8]
pushfd
push ebx
ror ebx, 0x1b
pop ebx
pushal
call sub.KERNEL32.DLL_GetCurrentProcess
popal
popfd
pcmpgtb mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentProcessId
popfd
popal
mov dword [ebp - 0xc], edi
inc dword [ebp - 0xc]
add edi, dword [ebp - 8]
inc edi
pushfd
push esi
rol esi, 0x12
pop esi
pushal
call sub.KERNEL32.DLL_GetCommandLineA
popal
popfd
punpckhdq mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetLastError
popfd
popal
dec ecx
cmp dword [ebp - 0xc], 0x64
jge 0x403734
pushfd
push eax
bt eax, 0x11
pop eax
pushal
call sub.KERNEL32.DLL_GetCommandLineA
popal
popfd
pushfd
push ecx
setg cl
pop ecx
pushal
call sub.KERNEL32.DLL_GetLastError
popal
popfd
pushal
pushfd
push eax
rol eax, 3
pop eax
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
push ebx
push ecx
pushfd
or ebx, ecx
popfd
pop ecx
pop ebx
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentThreadId
popfd
popal
mov esi, dword [ebp - 8]
mov edi, dword [ebp + 0x10]
mov ecx, dword [ebp - 0xc]
inc ecx
pushfd
push ebx
btr ebx, 0x1b
pop ebx
pushal
call sub.KERNEL32.DLL_GetCurrentProcessId
popal
popfd
push edx
call fcn.0040393f
pop edx
jmp 0x403638
cmp ecx, dword [ebp + 0x14]
jle 0x403642
jmp 0x403809
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax]
pushfd
push eax
rcl eax, 0x1d
pop eax
pushal
call sub.KERNEL32.DLL_GetCurrentProcessId
popal
popfd
paddb mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetLastError
popfd
popal
xor eax, 0x202020
pushfd
push ecx
btr ecx, 0x1c
pop ecx
pushal
call sub.KERNEL32.DLL_GetCurrentProcess
popal
popfd
por mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetTickCount
popfd
popal
cmp eax, 0x7243494d
pushfd
push esi
shl esi, 0x1e
pop esi
pushal
call sub.KERNEL32.DLL_GetCurrentProcessId
popal
popfd
push edx
call fcn.0040393f
pop edx
jmp 0x4036b4
jne 0x4036d7
popal
pushfd
push edx
bt edx, 0x13
pop edx
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
punpckhbw mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentThreadId
popfd
popal
jmp 0x403759
sub dword [ebp + 0x14], ecx
add dword [ebp + 0x10], ecx
mov eax, dword [ebp + 0xc]
add dword [eax], ecx
pushfd
push ecx
btr ecx, 0xd
pop ecx
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
push edx
call fcn.0040393f
pop edx
jmp 0x403710
dec ecx
rep movsb byte es:[edi], byte [esi]
pushfd
push eax
shl eax, 0x19
pop eax
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
push ecx
push eax
pushfd
cmovae ecx, eax
popfd
pop eax
pop ecx
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentProcessId
popfd
popal
popal
cmp ecx, 0
pushfd
push ebx
shl ebx, 0x16
pop ebx
pushal
call sub.KERNEL32.DLL_GetCurrentProcess
popal
popfd
pushfd
push eax
seta al
pop eax
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
jg 0x4032be
popal
pushfd
push eax
btc eax, 8
pop eax
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
wait
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentThreadId
popfd
popal
dec edi
pushfd
push edx
rcr edx, 9
pop edx
pushal
call sub.KERNEL32.DLL_GetTickCount
popal
popfd
push edx
push ebx
pushfd
cmova edx, ebx
popfd
pop ebx
pop edx
pushal
pushfd
call sub.KERNEL32.DLL_GetLastError
popfd
popal
push edi
call sub.KERNEL32.DLL_UnmapViewOfFile
push esi
call sub.KERNEL32.DLL_CloseHandle
pushfd
push eax
bt eax, 6
pop eax
pushal
call sub.KERNEL32.DLL_GetTickCount
popal
popfd
pushfd
push ecx
setle cl
pop ecx
pushal
call sub.KERNEL32.DLL_GetTickCount
popal
popfd
push ebx
call sub.KERNEL32.DLL_CloseHandle
pushfd
push ebx
bts ebx, 3
pop ebx
pushal
call sub.KERNEL32.DLL_GetCurrentProcessId
popal
popfd
push eax
push ecx
pushfd
cmova eax, ecx
popfd
pop ecx
pop eax
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentThreadId
popfd
popal
popal
pushfd
push eax
rcl eax, 0x12
pop eax
pushal
call sub.KERNEL32.DLL_GetCurrentProcessId
popal
popfd
push ecx
push eax
pushfd
cmove ecx, eax
popfd
pop eax
pop ecx
pushal
pushfd
call sub.KERNEL32.DLL_GetTickCount
popfd
popal
leave
ret 0x10
pushfd
push eax
rcr eax, 7
pop eax
pushal
call sub.KERNEL32.DLL_GetCommandLineA
popal
popfd
push edx
call fcn.0040393f
pop edx
jmp 0x403836
pushal
sub edi, dword [ebp + 0xc]
sub edi, 4
mov eax, dword [ebp + 0xc]
mov dword [eax], edi
pushfd
push ecx
sar ecx, 0xa
pop ecx
pushal
call sub.KERNEL32.DLL_GetCurrentProcessId
popal
popfd
pavgw mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentProcessId
popfd
popal
push 0
push dword [ebp + 0xc]
call fcn.004127e5
popal
pushfd
push esi
bt esi, 0x1a
pop esi
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
paddusw mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetTickCount
popfd
popal
push dword [ebp + 0xc]
pop dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
add dword [ebp + 0x10], 4
pushfd
push ebx
bts ebx, 0x18
pop ebx
pushal
call sub.KERNEL32.DLL_GetCurrentProcess
popal
popfd
pushfd
push eax
seto al
pop eax
pushal
call sub.KERNEL32.DLL_GetTickCount
popal
popfd
mov dword [eax], 0
pushfd
push ecx
btc ecx, 2
pop ecx
pushal
call sub.KERNEL32.DLL_GetLastError
popal
popfd
push ecx
push eax
pushfd
cmovs ecx, eax
popfd
pop eax
pop ecx
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentProcess
popfd
popal
mov dword [ebp + 0x14], 0xf9ffc
pushfd
push ecx
rol ecx, 6
pop ecx
pushal
call sub.KERNEL32.DLL_GetCurrentThread
popal
popfd
pmulhw mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentThread
popfd
popal
mov esi, dword [ebp - 8]
mov edi, dword [ebp + 0x10]
pushfd
push ebx
shl ebx, 0x17
pop ebx
pushal
call sub.KERNEL32.DLL_GetTickCount
popal
popfd
push ecx
push eax
pushfd
cmovbe ecx, eax
popfd
pop eax
pop ecx
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentThread
popfd
popal
mov ecx, dword [ebp - 0xc]
pushfd
push eax
bts eax, 4
pop eax
pushal
call sub.KERNEL32.DLL_GetTickCount
popal
popfd
pushfd
push ebx
setl bl
pop ebx
pushal
call sub.KERNEL32.DLL_GetLastError
popal
popfd
jmp 0x403642