Function at 0x403910
Capabilities:
Accept command line arguments
Check if file exists
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x421a22
mov eax, dword fs:[0]
push eax
sub esp, 0xf5c
mov eax, dword [0x4300b8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov ebx, edx
mov dword [ebp - 0xe84], ebx
mov dword [ebp - 0xe8c], eax
mov dword [ebp - 0xe88], ecx
mov dword [ebp - 0xe80], 0
mov dword [ebp - 0xe80], ebp
mov edx, dword [ebp - 0xe80]
push 0
push edx
push 0x424ba0
call fcn.00417080
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x403986
mov edi, str.long___thiscall_CCmdReceiver::PreHandleCmdlineEx_wchar_t__int_bool__
push ebx
push edi
mov edx, str.long___thiscall_CCmdReceiver::PreHandleCmdlineEx_wchar_t__int_bool__
mov ecx, 0x424c78
lea esi, [ebp - 0xea8]
call fcn.0040c280
mov dword [ebp - 4], 0
test edi, edi
jne 0x4039aa
push ebp
pop ebp
mov ecx, dword [ebp - 0xe8c]
lea eax, [ebp + 0xc]
push eax
push ecx
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov edi, eax
mov eax, dword [ebp + 0xc]
cmp eax, 2
jl 0x4041cb
mov edx, dword [edi + eax*4 - 4]
mov esi, dword [sym.imp.MSVCR90.dll__wcsicmp]
push edx
push str._launchprocess
call esi
add esp, 8
test eax, eax
jne 0x403afa
mov ecx, str.CCmdReceiver::PreHandleCmdlineEx
call fcn.0040bd20
test eax, eax
jne 0x403a66
mov eax, dword [edi + 4]
push eax
push ecx
mov ecx, dword [edi]
push ecx
push ecx
mov edx, ebx
mov ecx, str.CCmdReceiver::PreHandleCmdlineEx
call fcn.00411ce0
mov edx, str.launchprocess_Arg0
mov ecx, eax
call fcn.0040ba10
add esp, 4
push eax
call fcn.0040b8d0
mov edx, str.__Arg1
mov ecx, eax
call fcn.0040ba10
add esp, 4
push eax
call fcn.0040b8d0
mov esi, eax
xor eax, eax
mov dword [0x430e60], eax
mov edx, dword [esi + 0x240]
push 1
push edx
push 1
xor ecx, ecx
mov edx, esi
mov dword [esi + 0x248], eax
call fcn.00416620
add esi, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [sym.imp.MSVCR90.dll__wcsicmp]
mov eax, dword [edi]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x403abd
mov ecx, dword [edi]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x403abd
cmp dword [ebp + 0xc], 2
jne 0x403a8d
push 0x4256b8
jmp 0x403a91
mov edx, dword [edi + 4]
push edx
mov edi, dword [edi]
call section..text
mov eax, dword [ebp - 0xe88]
add esp, 4
mov byte [eax], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xea8]
call fcn.0040bfc0
xor eax, eax
jmp 0x4041f5
mov ecx, str.CCmdReceiver::PreHandleCmdlineEx
call fcn.0040bd20
test eax, eax
jne 0x403afa
mov ecx, dword [edi]
push ecx
push ecx
mov edx, ebx
mov ecx, str.CCmdReceiver::PreHandleCmdlineEx
call fcn.00411ce0
mov edx, str.launchprocess_PathFileExists_false__exepath
mov ecx, eax
call fcn.0040ba10
add esp, 4
push eax
call fcn.0040b8d0
mov ecx, 1
call fcn.0040bcf0
cmp dword [ebp + 0xc], 2
jl 0x4041cb
xor edx, edx
push 0x206
push edx
lea eax, [ebp - 0x216]
push eax
mov word [ebp - 0x218], dx
call sub.MSVCR90.dll_memset
mov ecx, dword [edi]
add esp, 0xc
push 0x104
push ecx
lea edx, [ebp - 0x218]
push edx
call dword [sym.imp.MSVCR90.dll_wcsncpy]
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x403c4c
lea ecx, [ebp - 0x218]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
test eax, eax
je 0x403c4c
push eax
push str..dll
call esi
add esp, 8
test eax, eax
jne 0x403c4c
mov edx, dword [edi + 4]
push edx
push 0x424d7c
call esi
add esp, 8
test eax, eax
jne 0x403c4c
mov eax, dword [ebp - 0xe88]
lea ecx, [ebp - 0x218]
push ecx
mov byte [eax], 1
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
push str.InstalledOk
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x403bbe
push ebx
call esi
mov ebx, eax
mov ecx, str.CCmdReceiver::PreHandleCmdlineEx
call fcn.0040bd20
test eax, eax
jne 0x403c33
push esi
push ecx
push edi
push ecx
lea edx, [ebp - 0x218]
push edx
mov edx, dword [ebp - 0xe84]
push ecx
mov ecx, str.CCmdReceiver::PreHandleCmdlineEx
call fcn.00411ce0
mov edx, str.loaddll_path
mov ecx, eax
call fcn.0040ba10
add esp, 4
push eax
call fcn.0040b8d0
mov edx, str.__handle_:
mov ecx, eax
call fcn.0040ba10
add esp, 4
mov esi, eax
call fcn.0040b790
mov edx, str.___function_:
mov ecx, eax
call fcn.0040ba10
add esp, 4
mov esi, eax
call fcn.0040b790
mov ecx, 1
call fcn.0040bcf0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xea8]
call fcn.0040bfc0
mov eax, ebx
jmp 0x4041f5
mov eax, dword [ebp + 0xc]
cmp eax, 2
jl 0x4041cb
mov eax, dword [edi + eax*4 - 4]
push eax
push str._rundll32
call esi
add esp, 8
test eax, eax
jne 0x4041cb
push 0x424de0
lea ecx, [ebp - 0xe7c]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_wchar_t_const__]
mov byte [ebp - 4], 1
mov ecx, dword [edi]
push ecx
lea ecx, [ebp - 0xe44]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_wchar_t_const__]
mov byte [ebp - 4], 2
push 0
push 0x2c
lea ecx, [ebp - 0xe44]
call dword [sym.imp.MSVCP90.dll_public:_unsigned_int___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::find_wchar_t__unsigned_int_const]
mov esi, eax
test esi, esi
jle 0x403d25
mov edx, dword [sym.imp.MSVCP90.dll_unsigned_int_const_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::npos]
mov eax, dword [edx]
push eax
lea ecx, [esi + 1]
push ecx
lea edx, [ebp - 0xee0]
push edx
lea ecx, [ebp - 0xe44]
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t_____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::substr_unsigned_int__unsigned_int_]
mov byte [ebp - 4], 3
push eax
lea ecx, [ebp - 0xe7c]
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0xee0]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
push esi
push 0
lea eax, [ebp - 0xec4]
push eax
lea ecx, [ebp - 0xe44]
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t_____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::substr_unsigned_int__unsigned_int_]
mov byte [ebp - 4], 4
push eax
lea ecx, [ebp - 0xe44]
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0xec4]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov ecx, str.CCmdReceiver::PreHandleCmdlineEx
call fcn.0040bd20
test eax, eax
jne 0x403dcb
mov ecx, dword [ebp - 0xe40]
mov eax, 8
cmp dword [ebp - 0xe2c], eax
jae 0x403d50
lea ecx, [ebp - 0xe40]
cmp dword [ebp - 0xe64], eax
mov eax, dword [ebp - 0xe78]
jae 0x403d64
lea eax, [ebp - 0xe78]
push ecx
push ecx
push eax
push ecx
mov edx, ebx
mov ecx, str.CCmdReceiver::PreHandleCmdlineEx
call fcn.00411ce0
mov edx, str.rundll32_entrypoint
mov ecx, eax
call fcn.0040ba10
add esp, 4
push eax
call fcn.0040b8d0
mov edx, str.__dllpath
mov ecx, eax
call fcn.0040ba10
add esp, 4
push eax
call fcn.0040b8d0
mov esi, eax
xor eax, eax
mov dword [0x430e60], eax
mov ecx, dword [esi + 0x240]
push 1
push ecx
push 1
xor ecx, ecx
mov edx, esi
mov dword [esi + 0x248], eax
call fcn.00416620
add esi, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0xe40]
mov esi, 8
cmp dword [ebp - 0xe2c], esi
jae 0x403de4
lea eax, [ebp - 0xe40]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4041ab
push 0x7ff
lea edx, [ebp - 0xe27]
push 0
push edx
mov byte [ebp - 0xe28], 0
call sub.MSVCR90.dll_memset
add esp, 0xc
cmp dword [ebp + 0xc], 3
jl 0x40415c
mov eax, dword [edi + 4]
push eax
lea ecx, [ebp - 0xe60]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_wchar_t_const__]
mov bl, 5
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0xe5c]
mov edi, 8
cmp dword [ebp - 0xe48], edi
jae 0x403e48
lea eax, [ebp - 0xe5c]
push 3
lea ecx, [ebp - 0xf60]
push eax
lea eax, [ebp - 0xf64]
mov dword [ebp - 0xf64], ecx
call fcn.00406090
mov byte [ebp - 4], 6
mov edx, dword [ebp - 0xe4c]
mov eax, dword [ebp - 0xf64]
push edx
push eax
lea ecx, [ebp - 0xe28]
push ecx
call dword [sym.imp.MSVCR90.dll_strncpy]
add esp, 0xc
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0xf64]
lea edx, [ebp - 0xf60]
cmp eax, edx
je 0x403ea1
push eax
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
xor eax, eax
push 0x206
push eax
lea ecx, [ebp - 0x41e]
push ecx
mov dword [ebp - 0xe90], 1
mov word [ebp - 0x420], ax
call sub.MSVCR90.dll_memset
add esp, 0xc
lea edx, [ebp - 0x420]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov ecx, str.CCmdReceiver::PreHandleCmdlineEx
call fcn.0040bd20
mov esi, dword [ebp - 0xe84]
test eax, eax
jne 0x403f22
lea eax, [ebp - 0x420]
push eax
push ecx
mov edx, esi
mov ecx, str.CCmdReceiver::PreHandleCmdlineEx
call fcn.00411ce0
mov edx, str.rundll32_GetCurrentDirectory
mov ecx, eax
call fcn.0040ba10
add esp, 4
push eax
call fcn.0040b8d0
mov ecx, 1
call fcn.0040bcf0
xor ecx, ecx
push 0x206
push ecx
lea edx, [ebp - 0x626]
push edx
mov word [ebp - 0x628], cx
call sub.MSVCR90.dll_memset
mov eax, dword [ebp - 0xe40]
add esp, 0xc
cmp dword [ebp - 0xe2c], edi
jae 0x403f54
lea eax, [ebp - 0xe40]
push 0x104
push eax
lea eax, [ebp - 0x628]
push eax
call dword [sym.imp.MSVCR90.dll_wcsncpy]
add esp, 0xc
lea ecx, [ebp - 0x628]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov ecx, str.CCmdReceiver::PreHandleCmdlineEx
call fcn.0040bd20
test eax, eax
jne 0x403fd5
lea edx, [ebp - 0x628]
push edx
push ecx
lea eax, [ebp - 0x420]
push eax
push ecx
mov edx, esi
mov ecx, str.CCmdReceiver::PreHandleCmdlineEx
call fcn.00411ce0
mov edx, str.rundll32_old_dir
mov ecx, eax
call fcn.0040ba10
add esp, 4
push eax
call fcn.0040b8d0
mov edx, str.__new_dir
mov ecx, eax
call fcn.0040ba10
add esp, 4
push eax
call fcn.0040b8d0
mov ecx, 1
call fcn.0040bcf0
mov ebx, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea ecx, [ebp - 0x628]
push ecx
call ebx
mov eax, dword [ebp - 0xe40]
cmp dword [ebp - 0xe2c], edi
jae 0x403ff8
lea eax, [ebp - 0xe40]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ecx, str.CCmdReceiver::PreHandleCmdlineEx
mov edi, eax
call fcn.0040bd20
test eax, eax
jne 0x404086
push eax
push ecx
push edi
push ecx
push eax
push ecx
mov edx, esi
mov ecx, str.CCmdReceiver::PreHandleCmdlineEx
call fcn.00411ce0
mov edx, str.rundll32_args_hwnd
mov ecx, eax
call fcn.0040ba10
add esp, 4
mov esi, eax
call fcn.0040b790
mov edx, str.__hinst
mov ecx, eax
call fcn.0040ba10
add esp, 4
mov esi, eax
call fcn.0040b790
mov edx, str.__szCmdLine
mov ecx, eax
call fcn.0040ba10
lea edx, [ebp - 0xe28]
mov ecx, eax
call fcn.0040ba10
mov edx, str.__nCmdShow
mov ecx, eax
call fcn.0040ba10
add esp, 4
mov esi, eax
call fcn.0040b810
mov ecx, 1
call fcn.0040bcf0
lea edx, [ebp - 0x420]
push edx
call ebx
test edi, edi
je 0x404144
push str.RunDllCommand
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, str.CCmdReceiver::PreHandleCmdlineEx
mov ebx, eax
call fcn.0040bd20
test eax, eax
jne 0x4040e5
mov edx, dword [ebp - 0xe84]
push ebx
push ecx
mov ecx, str.CCmdReceiver::PreHandleCmdlineEx
call fcn.00411ce0
mov edx, str.rundll32_GetProcAddress_pFun
mov ecx, eax
call fcn.0040ba10
add esp, 4
mov esi, eax
call fcn.0040b790
mov ecx, 1
call fcn.0040bcf0
test ebx, ebx
je 0x4040f9
xor esi, esi
push esi
lea eax, [ebp - 0xe28]
push eax
push edi
push esi
call ebx
jmp 0x4040ff
mov esi, dword [ebp - 0xe90]
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [ebp - 0xe88]
mov byte [ecx], 1
mov byte [ebp - 4], 2
lea ecx, [ebp - 0xe60]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xe44]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xe7c]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
jmp 0x4041e1
mov byte [ebp - 4], 2
lea ecx, [ebp - 0xe60]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov ebx, dword [ebp - 0xe84]
jmp 0x4041ab
mov ecx, str.CCmdReceiver::PreHandleCmdlineEx
call fcn.0040bd20
test eax, eax
jne 0x4041ab
mov eax, dword [ebp - 0xe40]
cmp dword [ebp - 0xe2c], esi
jae 0x40417e
lea eax, [ebp - 0xe40]
push eax
push ecx
mov edx, ebx
mov ecx, str.CCmdReceiver::PreHandleCmdlineEx
call fcn.00411ce0
mov edx, str.rundll32_PathFileExists_false__dllpath
mov ecx, eax
call fcn.0040ba10
add esp, 4
push eax
call fcn.0040b8d0
mov ecx, 1
call fcn.0040bcf0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xe44]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xe7c]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov edx, dword [ebp - 0xe88]
push edx
mov edx, dword [ebp - 0xe8c]
mov ecx, ebx
call fcn.00404220
mov esi, eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xea8]
call fcn.0040bfc0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041e4d2
mov esp, ebp
pop ebp
ret 8