Function at 0x4066e0
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4479a9
push eax
mov dword fs:[0], esp
sub esp, 0x3c
push ebx
push esi
push edi
call fcn.00405f90
xor ebx, ebx
cmp al, bl
je 0x40671c
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
add esp, 0x48
ret 0x10
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
push str.RICHED32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push ebx
push ebx
push ebx
push ebx
mov dword [esp + 0x20], eax
call dword [sym.imp.USER32.dll_DefWindowProcW]
lea eax, [esp + 0x14]
push eax
mov dword [esp + 0x18], 8
mov dword [esp + 0x1c], 0xff
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
push ebx
mov cl, byte [esp + 0x5c]
mov byte [esp + 0x20], cl
lea ecx, [esp + 0x20]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
mov dword [esp + 0x50], ebx
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov edi, eax
push edi
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
mov esi, eax
lea ecx, [esp + 0x1c]
push 1
push esi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Grow_unsigned_int__bool_]
test al, al
je 0x4067ad
mov edx, dword [esp + 0x20]
push esi
push edi
push edx
call fcn.00401270
add esp, 0xc
lea ecx, [esp + 0x1c]
push esi
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Eos_unsigned_int_]
push ebx
push ebx
lea ecx, [esp + 0x34]
call fcn.00422df0
mov eax, dword [esp + 0x20]
mov byte [esp + 0x50], 1
cmp eax, ebx
jne 0x4067ca
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
push eax
lea ecx, [esp + 0x30]
call fcn.00423180
mov esi, dword [esp + 0x20]
cmp esi, ebx
jne 0x4067e2
mov esi, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
mov eax, dword [0x4557e0]
cmp esi, ebx
mov dword [esp + 0xc], eax
je 0x406840
mov ecx, esi
shr ecx, 0x10
jne 0x406808
and esi, 0xffff
lea ecx, [esp + 0xc]
push esi
call fcn.00407050
jmp 0x406840
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, eax
cmp edi, ebx
je 0x406840
push edi
lea ecx, [esp + 0x10]
call fcn.004072c0
test eax, eax
je 0x406840
lea ecx, [edi + edi]
lea edx, [edi + edi + 2]
cmp edx, ecx
jb 0x406840
mov edi, dword [esp + 0xc]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0xc]
mov byte [esp + 0x50], 2
mov eax, dword [ecx - 8]
cmp eax, ebx
jl 0x406902
push str._Mx30Exit
push ecx
call dword [sym.imp.MSVCRT.dll_wcsstr]
add esp, 8
cmp eax, ebx
je 0x406902
sub eax, dword [esp + 0xc]
sar eax, 1
cmp eax, 0xffffffff
je 0x406902
push ebx
push 0x455808
call dword [sym.imp.USER32.dll_FindWindowW]
cmp eax, ebx
je 0x406902
push 0x590
push ebx
push 0x5f5
push eax
call dword [sym.imp.USER32.dll_PostMessageW]
mov edx, dword [0x4557e4]
mov eax, dword [esp + 0xc]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4068cb
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4068cb
mov edx, dword [esp + 0xc]
lea eax, [edx - 0xc]
push eax
call fcn.0043c8a0
add esp, 4
lea ecx, [esp + 0x2c]
mov byte [esp + 0x50], bl
call fcn.00423010
push 1
lea ecx, [esp + 0x20]
mov dword [esp + 0x54], 0xffffffff
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
add esp, 0x48
ret 0x10
mov eax, dword [esp + 0x58]
push ebx
push eax
push ebx
mov ecx, 0x457de8
call fcn.00406a20
cmp eax, ebx
jl 0x406951
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push 0xc
mov dword [0x457e6c], eax
mov dword [0x457e70], ebx
call fcn.0043c870
add esp, 4
cmp eax, ebx
je 0x406940
mov dword [eax], ebx
mov dword [eax + 4], ebx
mov dword [eax + 8], ebx
jmp 0x406942
xor eax, eax
cmp eax, ebx
mov dword [0x457e70], eax
je 0x406951
mov dword [0x457e74], ebx
call fcn.0042a1b0
mov ecx, dword [esp + 0x64]
mov edx, dword [esp + 0x60]
push ecx
push edx
call fcn.004063d0
add esp, 8
mov ecx, 0x457de8
mov edi, eax
call fcn.00406dc0
mov esi, dword [0x457e70]
cmp esi, ebx
je 0x40698e
mov ecx, esi
call fcn.00407010
push esi
call fcn.0043c8a0
add esp, 4
push 0x457de8
call fcn.00406c80
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
call dword [sym.imp.ole32.dll_CoUninitialize]
call fcn.0042d8d0
call fcn.0042a1c0
mov eax, dword [esp + 0xc]
mov edx, dword [0x4557e4]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4069e2
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4069e2
mov edx, dword [esp + 0xc]
lea eax, [edx - 0xc]
push eax
call fcn.0043c8a0
add esp, 4
lea ecx, [esp + 0x2c]
mov byte [esp + 0x50], bl
call fcn.00423010
push 1
lea ecx, [esp + 0x20]
mov dword [esp + 0x54], 0xffffffff
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
mov eax, edi
pop edi
mov ecx, dword [esp + 0x44]
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x48
ret 0x10