Function at 0x421670
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x456c0c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x45c
push 2
push 0
call dword [sym.imp.ole32.dll_CoInitializeEx]
test eax, eax
jge 0x4216a6
mov eax, 1
jmp 0x421a5a
push 0
call dword [sym.imp.ole32.dll_OleInitialize]
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
push 0x3b0
call fcn.0043472c
add esp, 4
mov dword [ebp - 0x20], eax
mov dword [ebp - 4], 0
cmp dword [ebp - 0x20], 0
je 0x4216de
mov ecx, dword [ebp - 0x20]
call fcn.00401ec0
mov dword [ebp - 0x24], eax
jmp 0x4216e5
mov dword [ebp - 0x24], 0
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x30], eax
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x30]
mov dword [0x46b3a0], ecx
mov edx, dword [0x46b3a0]
mov eax, dword [ebp + 8]
mov dword [edx + 0x320], eax
cmp dword [ebp + 0xc], 0
je 0x42171f
mov ecx, dword [ebp + 0xc]
push ecx
mov ecx, dword [0x46b3a0]
call fcn.00402560
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x1c], 0
mov dword [0x46b3a8], 0x280
mov dword [0x46b3ac], 0x1e0
mov dword [0x46b3b0], 0
mov dword [0x46b3b4], 0
mov dword [ebp - 0x14], 0
jmp 0x421767
mov edx, dword [ebp - 0x14]
add edx, 1
mov dword [ebp - 0x14], edx
cmp dword [ebp - 0x14], 8
jge 0x42179a
mov eax, dword [ebp - 0x14]
movsx ecx, byte [eax + 0x4690a0]
sub ecx, 0x30
mov byte [ebp - 0xd], cl
movsx edx, byte [ebp - 0xd]
mov eax, dword [ebp - 0x14]
movsx ecx, byte [eax + 0x469098]
cmp edx, ecx
jne 0x421798
mov edx, dword [ebp - 0x1c]
add edx, 1
mov dword [ebp - 0x1c], edx
jmp 0x42175e
cmp dword [ebp - 0x1c], 0
jne 0x42181b
push str.363520
call fcn.0043d6eb
add esp, 4
add eax, 0x10000
mov dword [ebp - 0x28], eax
mov al, byte [0x4690b1]
mov byte [ebp - 0xd], al
movsx ecx, byte [ebp - 0xd]
cmp ecx, 0x73
jne 0x4217d0
mov dword [0x46b3b4], 2
movsx edx, word [0x4690b4]
mov dword [0x46b3a8], edx
movsx eax, word [0x4690b7]
mov dword [0x46b3ac], eax
movsx ecx, word [0x4690ba]
mov dword [0x46b3b0], ecx
movzx edx, word [0x4690bd]
mov dword [ebp - 0x38], edx
mov eax, dword [0x4690c0]
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x34]
push ecx
mov edx, dword [ebp - 0x38]
push edx
mov ecx, dword [0x46b3a0]
call fcn.00402530
mov eax, dword [0x46b3b0]
and eax, 2
jne 0x421860
push 0x104
lea ecx, [ebp - 0x25c]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x20
lea edx, [ebp - 0x468]
push edx
lea eax, [ebp - 0x25c]
push eax
call fcn.00433490
add esp, 0xc
lea ecx, [ebp - 0x468]
push ecx
call fcn.00433760
add esp, 4
mov edx, dword [ebp - 0x28]
push edx
mov ecx, dword [0x46b3a0]
call fcn.00402110
test eax, eax
je 0x42188a
push str.Startup_failed.
call fcn.00421a70
add esp, 4
mov eax, 1
jmp 0x421a5a
mov eax, dword [0x46b3a0]
mov dword [0x46b3a4], eax
cmp dword [0x46b3b4], 0
je 0x421984
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.00433ee0
add esp, 4
mov dword [ebp - 0x18], eax
mov dword [0x46b3b8], 0x1e
mov edx, dword [ebp - 0x18]
movzx eax, word [edx + 2]
push eax
call fcn.0043ca57
add esp, 4
mov byte [ebp - 0xd], al
push 0
push str.oniwndp
call dword [sym.imp.USER32.dll_FindWindowW]
test eax, eax
je 0x4218f1
mov eax, 2
jmp 0x421a5a
movsx ecx, byte [ebp - 0xd]
cmp ecx, 0x70
jne 0x42194a
mov edx, dword [ebp - 0x18]
add edx, 6
push edx
call fcn.0043d6c1
add esp, 4
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x48]
push eax
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.USER32.dll_GetWindowRect]
mov edx, dword [ebp - 0x40]
sub edx, dword [ebp - 0x48]
mov dword [0x46b3a8], edx
mov eax, dword [ebp - 0x3c]
sub eax, dword [ebp - 0x44]
mov dword [0x46b3ac], eax
mov dword [0x46b3b0], 0x100
mov ecx, dword [0x46b3a4]
mov edx, dword [ebp - 0x2c]
mov dword [ecx + 0x358], edx
movsx eax, byte [ebp - 0xd]
cmp eax, 0x73
jne 0x42195d
push 0
call dword [sym.imp.USER32.dll_ShowCursor]
jmp 0x421967
mov dword [0x46b3b4], 0
mov ecx, dword [0x46b3a4]
mov edx, dword [ecx + 0x30c]
or edx, dword [0x46b3b4]
mov eax, dword [0x46b3a4]
mov dword [eax + 0x30c], edx
mov ecx, dword [0x46b3a4]
mov dword [ecx + 0x354], fcn.00421d30
push 0x4220d0
push 6
call fcn.00410340
add esp, 8
push 0x422af0
push 7
call fcn.00410340
add esp, 8
mov dword [0x4690c8], 0xffffffff
mov edx, dword [0x46b3a4]
mov eax, dword [edx]
mov ecx, dword [eax + 0x58]
and ecx, 0x2000
jne 0x4219f4
push 8
lea edx, [ebp - 0x50]
push edx
call dword [sym.imp.WINMM.dll_timeGetDevCaps]
test eax, eax
jne 0x4219f4
mov eax, dword [ebp - 0x50]
mov dword [0x4690c8], eax
mov ecx, dword [0x4690c8]
push ecx
call dword [sym.imp.WINMM.dll_timeBeginPeriod]
push 0x10
call fcn.00405290
add esp, 4
push eax
call fcn.0041a9f0
add esp, 4
push 0x11
call fcn.00405290
add esp, 4
push eax
call fcn.0041aa90
add esp, 4
push 0xffffffffffffffff
push 0xffffffffffffffff
mov edx, dword [0x46b3b0]
push edx
mov eax, dword [0x46b3ac]
push eax
mov ecx, dword [0x46b3a8]
push ecx
push 9
call fcn.00405290
add esp, 4
push eax
call fcn.0041d600
add esp, 0x18
push 0xa
call fcn.00405290
add esp, 4
push eax
call fcn.0041d860
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret