Function at 0x40e900
Capabilities:
Accept command line arguments
Set environment variable

Disassembly:
sub esp, 0xc4
push ebp
push esi
push edi
push 1
call fcn.004047f1
xor ebp, ebp
push ebp
call dword [sym.imp.ole32.dll_OleInitialize]
mov ecx, 0x42faa8
call fcn.004053bc
push 0x7002
push ebp
push 0x4411c0
call fcn.00410480
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov esi, eax
test esi, esi
je 0x40e9b4
push esi
call fcn.0040d12a
cmp byte [0x4481f9], 0
je 0x40e9ae
push 0x42309c
push ebp
mov esi, 0xf001f
push esi
call dword [sym.imp.KERNEL32.dll_OpenFileMappingW]
mov edi, eax
test edi, edi
je 0x40e9a5
push 0x7002
push ebp
push ebp
push esi
push edi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov esi, eax
test esi, esi
je 0x40e99e
push 0x7002
push esi
push 0x4411c0
call fcn.00410ca0
add esp, 0xc
mov byte [esi], 1
push 0x4411c2
call fcn.0040e5e5
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40e9b4
push esi
call fcn.0040e5e5
push 0x800
mov edi, 0x4538d0
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov esi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push edi
push str.sfxname
call esi
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx eax, word [esp + 0x1a]
push eax
movzx eax, word [esp + 0x1c]
push eax
movzx eax, word [esp + 0x1e]
push eax
movzx eax, word [esp + 0x20]
push eax
movzx eax, word [esp + 0x22]
push eax
movzx eax, word [esp + 0x22]
push eax
movzx eax, word [esp + 0x24]
push eax
push str._4d__02d__02d__02d__02d__02d__03d
lea eax, [esp + 0x8c]
push 0x32
push eax
call fcn.004037a4
add esp, 0x28
lea eax, [esp + 0x6c]
push eax
push str.sfxstime
call esi
push ebp
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov esi, eax
push 0x64
push esi
mov dword [0x4481d8], esi
mov dword [0x4481d4], esi
call dword [sym.imp.USER32.dll_LoadIconW]
push 0x65
push dword [0x4481d4]
mov dword [0x4548d0], eax
call dword [sym.imp.USER32.dll_LoadBitmapW]
lea ecx, [esp + 0x1c]
mov dword [0x4548d4], eax
call fcn.0040b9e7
push edi
mov ecx, 0x44a30c
call fcn.004039ea
lea ecx, [esp + 0x48]
call fcn.0040a69e
lea ecx, [esp + 0x24]
call fcn.0040a69e
push ebp
push 0x40c3eb
push ebp
lea eax, [esp + 0x54]
mov dword [0x4481c8], eax
lea eax, [esp + 0x30]
push str.STARTDLG
push esi
mov dword [0x4481cc], eax
call dword [sym.imp.USER32.dll_DialogBoxParamW]
lea ecx, [esp + 0x24]
mov dword [0x4481cc], ebp
mov dword [0x4481c8], ebp
call fcn.0040a71e
lea ecx, [esp + 0x48]
call fcn.0040a71e
lea ecx, [esp + 0x1c]
call fcn.0040ba35
mov eax, dword [0x4548e8]
test eax, eax
je 0x40eae4
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [0x4481f0], 0
je 0x40eaf2
call fcn.0040bb23
mov ecx, 0x4537c0
call fcn.00404137
cmp dword [0x4481c4], ebp
jbe 0x40eb10
push dword [0x4411bc]
call fcn.00414980
pop ecx
push dword [0x4548d0]
mov esi, dword [sym.imp.GDI32.dll_DeleteObject]
call esi
mov eax, dword [0x4548d4]
test eax, eax
je 0x40eb2a
push eax
call esi
cmp dword [0x44a2fc], 0
pop edi
pop esi
pop ebp
jne 0x40eb4e
cmp byte [0x4481e9], 0
je 0x40eb4e
push 0xff
mov ecx, 0x44a2fc
call fcn.00401a73
mov eax, dword [0x4548ec]
mov byte [0x4481e9], 1
test eax, eax
je 0x40eb70
push eax
call fcn.0040e674
push dword [0x4548ec]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.ole32.dll_OleUninitialize]
mov eax, dword [0x4548e4]
test eax, eax
jne 0x40eb84
mov eax, dword [0x44a2fc]
add esp, 0xc4
ret 0x10