Function at 0x401066
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff9c
pushal
pushfd
push ebx
btc ebx, 0x1f
pop ebx
pushal
call sub.KERNEL32.DLL_GetCurrentProcessId
popal
popfd
pushfd
push eax
setae al
pop eax
pushal
call sub.KERNEL32.DLL_GetCurrentProcessId
popal
popfd
mov eax, dword [ebp + 0xc]
pushfd
push ebx
shl ebx, 0x18
pop ebx
pushal
call sub.KERNEL32.DLL_GetCommandLineA
popal
popfd
pushfd
push ecx
setge cl
pop ecx
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
mov dword [eax], 0
push edi
pushfd
push esi
sar esi, 0xb
pop esi
pushal
call sub.KERNEL32.DLL_GetCurrentProcessId
popal
popfd
pushfd
push ecx
setge cl
pop ecx
pushal
call sub.KERNEL32.DLL_GetCurrentThread
popal
popfd
push ecx
pushfd
push eax
shl eax, 3
pop eax
pushal
call sub.KERNEL32.DLL_GetCurrentProcess
popal
popfd
push ecx
push eax
pushfd
cmovbe ecx, eax
popfd
pop eax
pop ecx
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentThread
popfd
popal
push eax
lea edi, [0x420008]
pushfd
push ebx
rcl ebx, 3
pop ebx
pushal
call sub.KERNEL32.DLL_GetCurrentProcessId
popal
popfd
push ebx
push eax
pushfd
cmovo ebx, eax
popfd
pop eax
pop ebx
pushal
pushfd
call sub.KERNEL32.DLL_GetCommandLineA
popfd
popal
mov ecx, 0x24
pushfd
push esi
rol esi, 0x17
pop esi
pushal
call sub.KERNEL32.DLL_GetCurrentProcess
popal
popfd
push edx
call fcn.00401aec
pop edx
jmp 0x401147
xor eax, eax
pushfd
push eax
bt eax, 0x19
pop eax
pushal
call sub.KERNEL32.DLL_GetCurrentProcessId
popal
popfd
push edx
call fcn.00401aec
pop edx
jmp 0x401177
mov edx, 0x33
mov al, 0
pushfd
push ebx
btc ebx, 0xe
pop ebx
pushal
call sub.KERNEL32.DLL_GetTickCount
popal
popfd
paddw mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentProcess
popfd
popal
stosd dword es:[edi], eax
pushfd
push ebx
rcr ebx, 0xd
pop ebx
pushal
call sub.KERNEL32.DLL_GetCommandLineA
popal
popfd
push ebx
push ecx
pushfd
imul ebx, ecx
popfd
pop ecx
pop ebx
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentThreadId
popfd
popal
add al, dl
stosd dword es:[edi], eax
add al, dl
pushfd
push eax
rol eax, 0x14
pop eax
pushal
call sub.KERNEL32.DLL_GetCurrentProcess
popal
popfd
stosd dword es:[edi], eax
pushfd
push ebx
bts ebx, 0x1b
pop ebx
pushal
call sub.KERNEL32.DLL_GetLastError
popal
popfd
push edx
call fcn.00401aec
pop edx
jmp 0x4011fd
add al, dl
pushfd
push edx
shl edx, 5
pop edx
pushal
call sub.KERNEL32.DLL_GetTickCount
popal
popfd
pushfd
push eax
setae al
pop eax
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
stosd dword es:[edi], eax
pushfd
push edx
bt edx, 0x1e
pop edx
pushal
call sub.KERNEL32.DLL_GetTickCount
popal
popfd
punpckhwd mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentThread
popfd
popal
add al, dl
pushfd
push ebx
shl ebx, 0
pop ebx
pushal
call sub.KERNEL32.DLL_GetCurrentThread
popal
popfd
pushfd
push ebx
setp bl
pop ebx
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
stosd dword es:[edi], eax
pushfd
push ebx
shl ebx, 4
pop ebx
pushal
call sub.KERNEL32.DLL_GetCurrentThread
popal
popfd
pushfd
push ebx
seto bl
pop ebx
pushal
call sub.KERNEL32.DLL_GetTickCount
popal
popfd
add al, dl
stosd dword es:[edi], eax
add ah, dl
cmp ecx, 0x1e
je 0x401290
cmp ecx, 0x18
je 0x401290
cmp ecx, 0x12
je 0x401290
cmp ecx, 0xc
je 0x401290
cmp ecx, 6
jne 0x4012e3
pushfd
push ebx
btr ebx, 3
pop ebx
pushal
call sub.KERNEL32.DLL_GetCurrentProcessId
popal
popfd
mov ah, 0
pushfd
push edx
sar edx, 0x19
pop edx
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
pmaxsw mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetCommandLineA
popfd
popal
ror eax, 0x10
pushfd
push ecx
ror ecx, 0x1a
pop ecx
pushal
call sub.KERNEL32.DLL_GetCurrentThread
popal
popfd
push edx
push eax
pushfd
cmovs edx, eax
popfd
pop eax
pop edx
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentProcessId
popfd
popal
add al, dl
rol eax, 0x10
pushfd
push ebx
sar ebx, 0x19
pop ebx
pushal
call sub.KERNEL32.DLL_GetCurrentProcessId
popal
popfd
push ecx
push esi
pushfd
cmovle ecx, esi
popfd
pop esi
pop ecx
pushal
pushfd
call sub.KERNEL32.DLL_GetCommandLineA
popfd
popal
dec ecx
pushfd
push edx
bt edx, 0x1c
pop edx
pushal
call sub.KERNEL32.DLL_GetLastError
popal
popfd
pushfd
push ecx
setge cl
pop ecx
pushal
call sub.KERNEL32.DLL_GetCurrentProcessId
popal
popfd
jne 0x40117c
pushfd
push ebx
rcr ebx, 0xe
pop ebx
pushal
call sub.KERNEL32.DLL_GetCurrentProcessId
popal
popfd
punpckhwd mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetCommandLineA
popfd
popal
pop eax
pop ecx
pop edi
pushfd
push edx
rcl edx, 8
pop edx
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
push ecx
push ebx
pushfd
cmovnp ecx, ebx
popfd
pop ebx
pop ecx
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentProcess
popfd
popal
push 4
push 0x1000
push 0x400
push 0
call sub.KERNEL32.DLL_VirtualAlloc
mov dword [ebp - 0x64], eax
mov edi, dword [ebp - 0x64]
pushfd
push ecx
rol ecx, 7
pop ecx
pushal
call sub.KERNEL32.DLL_GetCurrentProcess
popal
popfd
pminub mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentThreadId
popfd
popal
lea esi, [0x420008]
mov ecx, 0xd8
lodsd eax, dword [esi]
pushfd
push eax
shl eax, 0xd
pop eax
pushal
call sub.KERNEL32.DLL_GetCommandLineA
popal
popfd
pushfd
push ebx
sets bl
pop ebx
pushal
call sub.KERNEL32.DLL_GetLastError
popal
popfd
shl eax, 8
bswap eax
stosd dword es:[edi], eax
pushfd
push ebx
bts ebx, 9
pop ebx
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
push ecx
push ecx
pushfd
cmovge ecx, ecx
popfd
pop ecx
pop ecx
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentProcess
popfd
popal
dec ecx
pushfd
push edx
bt edx, 0
pop edx
pushal
call sub.KERNEL32.DLL_GetCurrentProcess
popal
popfd
fxam
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentProcess
popfd
popal
jne 0x4013a2
pushfd
push ebx
rcr ebx, 1
pop ebx
pushal
call sub.KERNEL32.DLL_GetCurrentProcess
popal
popfd
psadbw mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentProcessId
popfd
popal
push 0x4bc1414b
sub dword [esp], 0x4b67ffff
pushfd
push eax
btc eax, 0x12
pop eax
pushal
call sub.KERNEL32.DLL_GetCurrentProcess
popal
popfd
paddw mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentThreadId
popfd
popal
push eax
mov dword [esp], 0xc4394943
push edx
mov edx, esp
add edx, 4
sub dword [edx], 0x73e5ffff
pop edx
lea eax, [esp]
push 0
push 0
push 0
push eax
call sub.gdi32.dll_CreateDCA
add esp, 8
mov dword [ebp - 4], eax
pushfd
push eax
bts eax, 0xd
pop eax
pushal
call sub.KERNEL32.DLL_GetCurrentProcessId
popal
popfd
push ecx
push ebx
pushfd
cmovle ecx, ebx
popfd
pop ebx
pop ecx
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentProcessId
popfd
popal
or eax, eax
pushfd
push edx
shl edx, 0x1e
pop edx
pushal
call sub.KERNEL32.DLL_GetCommandLineA
popal
popfd
paddusw mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetLastError
popfd
popal
je 0x401aac
pushfd
push eax
rcr eax, 1
pop eax
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
push edx
push edx
pushfd
cmovae edx, edx
popfd
pop edx
pop edx
pushal
pushfd
call sub.KERNEL32.DLL_GetCommandLineA
popfd
popal
push 8
push dword [ebp - 4]
call sub.gdi32.dll_GetDeviceCaps
mov dword [ebp - 0x48], eax
pushfd
push edx
btr edx, 0
pop edx
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
push ebx
push ebx
pushfd
cmovl ebx, ebx
popfd
pop ebx
pop ebx
pushal
pushfd
call sub.KERNEL32.DLL_GetLastError
popfd
popal
push 0xa
push dword [ebp - 4]
call sub.gdi32.dll_GetDeviceCaps
mov dword [ebp - 0x4c], eax
push 0xc
push dword [ebp - 4]
call sub.gdi32.dll_GetDeviceCaps
mov dword [ebp - 0x50], eax
push dword [ebp - 4]
call sub.gdi32.dll_CreateCompatibleDC
mov dword [ebp - 8], eax
or eax, eax
jne 0x401533
push dword [ebp - 4]
call sub.gdi32.dll_DeleteDC
jmp 0x401aac
pushfd
push ebx
bt ebx, 7
pop ebx
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
faddp st(1)
pushal
pushfd
call sub.KERNEL32.DLL_GetLastError
popfd
popal
push 4
push 0x1000
push 0x428
push 0
call sub.KERNEL32.DLL_VirtualAlloc
pushfd
push ebx
btr ebx, 0x14
pop ebx
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
pminsw mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentProcess
popfd
popal
mov dword [ebp - 0x60], eax
mov dword [eax], 0x2c
push dword [ebp - 0x48]
pop dword [eax + 4]
push dword [ebp - 0x4c]
pop dword [eax + 8]
neg dword [eax + 8]
mov word [eax + 0xc], 1
mov word [eax + 0xe], 8
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0
mov dword [eax + 0x18], 0
mov dword [eax + 0x1c], 0
mov dword [eax + 0x20], 0xd8
mov dword [eax + 0x24], 0xd8
pushfd
push ecx
rcl ecx, 0x15
pop ecx
pushal
call sub.KERNEL32.DLL_GetCurrentProcess
popal
popfd
push ecx
push eax
pushfd
cmovae ecx, eax
popfd
pop eax
pop ecx
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentProcess
popfd
popal
mov eax, dword [ebp - 0x48]
imul eax, dword [ebp - 0x4c]
push 0
push eax
push 0
push 0xc
push 0
push 0xffffffffffffffff
call sub.KERNEL32.DLL_CreateFileMappingA
pushfd
push ecx
rcl ecx, 0xa
pop ecx
pushal
call sub.KERNEL32.DLL_GetTickCount
popal
popfd
push edx
call fcn.00401aec
pop edx
jmp 0x40162d
mov dword [0x421275], eax
pushfd
push edx
btc edx, 0x14
pop edx
pushal
call sub.KERNEL32.DLL_GetCurrentProcessId
popal
popfd
push edx
call fcn.00401aec
pop edx
jmp 0x401660
push 0
push dword [0x421275]
lea eax, [ebp - 0x44]
push eax
push 1
push dword [ebp - 0x60]
push dword [ebp - 8]
call sub.gdi32.dll_CreateDIBSection
pushfd
push eax
shl eax, 0xe
pop eax
pushal
call sub.KERNEL32.DLL_GetTickCount
popal
popfd
pandn mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentThread
popfd
popal
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x401713
pushfd
push ecx
sar ecx, 4
pop ecx
pushal
call sub.KERNEL32.DLL_GetCurrentProcess
popal
popfd
punpckhwd mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetTickCount
popfd
popal
push dword [ebp - 4]
call sub.gdi32.dll_DeleteDC
push dword [ebp - 8]
call sub.gdi32.dll_DeleteDC
pushfd
push ebx
rol ebx, 0x12
pop ebx
pushal
call sub.KERNEL32.DLL_GetLastError
popal
popfd
pushfd
push eax
setle al
pop eax
pushal
call sub.KERNEL32.DLL_GetTickCount
popal
popfd
push dword [0x421275]
call sub.KERNEL32.DLL_CloseHandle
pushfd
push ecx
bts ecx, 0x13
pop ecx
pushal
call sub.KERNEL32.DLL_GetCommandLineA
popal
popfd
push ebx
push edx
pushfd
cmovnp ebx, edx
popfd
pop edx
pop ebx
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentProcessId
popfd
popal
jmp 0x401aac
push dword [ebp - 0x10]
push dword [ebp - 8]
call sub.gdi32.dll_SelectObject
pushfd
push edx
shl edx, 0x1c
pop edx
pushal
call sub.KERNEL32.DLL_GetCommandLineA
popal
popfd
pushfd
push eax
setp al
pop eax
pushal
call sub.KERNEL32.DLL_GetLastError
popal
popfd
mov dword [ebp - 0x5c], eax
push dword [ebp - 0x64]
push 0xd8
push 0
push dword [ebp - 8]
call sub.gdi32.dll_SetDIBColorTable
cmp dword [ebp - 0x5c], 0
je 0x40175e
cmp dword [ebp - 0x5c], 0xffff
jne 0x4017b6
push dword [ebp - 4]
call sub.gdi32.dll_DeleteDC
push dword [ebp - 8]
call sub.gdi32.dll_DeleteDC
pushfd
push edx
btr edx, 0x17
pop edx
pushal
call sub.KERNEL32.DLL_GetTickCount
popal
popfd
pushfd
push ebx
setno bl
pop ebx
pushal
call sub.KERNEL32.DLL_GetTickCount
popal
popfd
push dword [0x421275]
call sub.KERNEL32.DLL_CloseHandle
pushfd
push eax
btr eax, 0xc
pop eax
pushal
call sub.KERNEL32.DLL_GetCommandLineA
popal
popfd
pcmpgtw mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetTickCount
popfd
popal
jmp 0x401aac
push 0xcc0020
push 0
push 0
push dword [ebp - 4]
push dword [ebp - 0x4c]
push dword [ebp - 0x48]
push 0
push 0
push dword [ebp - 8]
call sub.gdi32.dll_BitBlt
or eax, eax
jne 0x401864
pushfd
push ebx
bt ebx, 0x11
pop ebx
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
push edx
call fcn.00401aec
pop edx
jmp 0x40180a
push dword [ebp - 4]
call sub.gdi32.dll_DeleteDC
push dword [ebp - 8]
call sub.gdi32.dll_DeleteDC
pushfd
push eax
rcr eax, 3
pop eax
pushal
call sub.KERNEL32.DLL_GetCurrentProcessId
popal
popfd
paddusb mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentProcessId
popfd
popal
push dword [0x421275]
call sub.KERNEL32.DLL_CloseHandle
pushfd
push esi
ror esi, 6
pop esi
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
push eax
push ebx
pushfd
cmova eax, ebx
popfd
pop ebx
pop eax
pushal
pushfd
call sub.KERNEL32.DLL_GetCommandLineA
popfd
popal
jmp 0x401aac
push 4
push 0x1000
push 0x300
push 0
call sub.KERNEL32.DLL_VirtualAlloc
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x54], 0
je 0x4018ad
push dword [ebp - 0x14]
push dword [ebp - 0x54]
push 0
push dword [ebp - 8]
call sub.gdi32.dll_GetDIBColorTable
pushfd
push ecx
rcl ecx, 4
pop ecx
pushal
call sub.KERNEL32.DLL_GetCommandLineA
popal
popfd
pcmpeqb mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentProcessId
popfd
popal
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x4c]
pushfd
push ebx
shl ebx, 0x1a
pop ebx
pushal
call sub.KERNEL32.DLL_GetCurrentProcess
popal
popfd
pushfd
push eax
dec al
pop eax
pushal
call sub.KERNEL32.DLL_GetCommandLineA
popal
popfd
imul eax, dword [ebp - 0x48]
pushfd
push eax
rcl eax, 0x1d
pop eax
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
push ecx
push eax
pushfd
cmovb ecx, eax
popfd
pop eax
pop ecx
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentThread
popfd
popal
push 4
push 0x1000
push eax
push 0
call sub.KERNEL32.DLL_VirtualAlloc
pushfd
push eax
rcr eax, 0x17
pop eax
pushal
call sub.KERNEL32.DLL_GetCurrentThreadId
popal
popfd
push edx
call fcn.00401aec
pop edx
jmp 0x40192c
mov ebx, eax
pushfd
push edx
bts edx, 0x12
pop edx
pushal
call sub.KERNEL32.DLL_GetTickCount
popal
popfd
fyl2x
pushal
pushfd
call sub.KERNEL32.DLL_GetTickCount
popfd
popal
lea esi, [0x420008]
lea edx, [esi + 1]
lea ecx, [esi + 2]
pushfd
push ecx
shl ecx, 0
pop ecx
pushal
call sub.KERNEL32.DLL_GetCurrentThread
popal
popfd
paddsb mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentThread
popfd
popal
push dword [ebp - 0x44]
push ecx
push edx
push esi
push 8
push 1
push 0
push dword [ebp - 0x4c]
push dword [ebp - 0x48]
push ebx
call fcn.00416cdc
pushfd
push ecx
rcr ecx, 0x16
pop ecx
pushal
call sub.KERNEL32.DLL_GetCurrentThread
popal
popfd
fcos
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentThread
popfd
popal
mov edi, eax
pushfd
push esi
rol esi, 0x14
pop esi
pushal
call sub.KERNEL32.DLL_GetCurrentProcessId
popal
popfd
packssdw mm0, mm1
pushal
pushfd
call sub.KERNEL32.DLL_GetCommandLineA
popfd
popal
mov eax, dword [ebp + 8]
mov dword [eax], ebx
pushfd
push ecx
bt ecx, 0x11
pop ecx
pushal
call sub.KERNEL32.DLL_GetCurrentThread
popal
popfd
push eax
push ebx
pushfd
cmovne eax, ebx
popfd
pop ebx
pop eax
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentThreadId
popfd
popal
mov eax, dword [ebp + 0xc]
mov dword [eax], edi
push dword [ebp - 0x10]
call sub.gdi32.dll_DeleteObject
pushfd
push esi
rcr esi, 6
pop esi
pushal
call sub.KERNEL32.DLL_GetLastError
popal
popfd
push ecx
push esi
pushfd
or ecx, esi
popfd
pop esi
pop ecx
pushal
pushfd
call sub.KERNEL32.DLL_GetTickCount
popfd
popal
push dword [ebp - 8]
call sub.gdi32.dll_DeleteDC
pushfd
push ebx
bt ebx, 0xe
pop ebx
pushal
call sub.KERNEL32.DLL_GetTickCount
popal
popfd
push esi
push eax
pushfd
cmovne esi, eax
popfd
pop eax
pop esi
pushal
pushfd
call sub.KERNEL32.DLL_GetCurrentProcess
popfd
popal
push dword [ebp - 4]
call sub.gdi32.dll_DeleteDC
push 0x8000
push 0
push dword [ebp - 0x14]
call sub.KERNEL32.DLL_VirtualFree
push 0x8000
push 0
push dword [ebp - 0x64]
call sub.KERNEL32.DLL_VirtualFree
pushfd
push edx
shl edx, 0x19
pop edx
pushal
call sub.KERNEL32.DLL_GetTickCount
popal
popfd
push esi
push ecx
pushfd
adc esi, ecx
popfd
pop ecx
pop esi
pushal
pushfd
call sub.KERNEL32.DLL_GetLastError
popfd
popal
push 0x8000
push 0
push dword [ebp - 0x60]
call sub.KERNEL32.DLL_VirtualFree
push dword [0x421275]
call sub.KERNEL32.DLL_CloseHandle
pushfd
push ebx
shl ebx, 3
pop ebx
pushal
call sub.KERNEL32.DLL_GetCommandLineA
popal
popfd
mov dword [esp + 0x1c], ebx
popal
leave
ret 8
pushfd
push esi
rcl esi, 7
pop esi
pushal
call sub.KERNEL32.DLL_GetCommandLineA
popal
popfd
pushfd
push eax
setae al
pop eax
pushal
call sub.KERNEL32.DLL_GetTickCount
popal
popfd
popal
pushfd
push ebx
btc ebx, 2
pop ebx
pushal
call sub.KERNEL32.DLL_GetCommandLineA
popal
popfd
pushfd
push eax
setb al
pop eax
pushal
call sub.KERNEL32.DLL_GetLastError
popal
popfd
xor eax, eax
leave
ret 8