Function at 0x401cf0
Capabilities:
Accept command line arguments
Check mutex on windows
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc48
push ebx
push esi
push edi
xor ebx, ebx
xor eax, eax
mov byte [ebp - 0x848], bl
mov ecx, 0xff
lea edi, [ebp - 0x847]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [str.EnableFloatingPointExceptions]
push eax
push ebx
push 6
mov byte [ebp - 5], bl
call fcn.004024c0
mov ecx, dword [str.SoftwareRealNetworks_s_d._dPreferences_s]
push eax
push ecx
lea edx, [ebp - 0x848]
push edx
call dword [sym.imp.MSVCR71.dll_sprintf]
add esp, 0x18
lea eax, [ebp - 4]
push eax
push 0x20019
push ebx
lea ecx, [ebp - 0x848]
push ecx
push 0x80000000
mov dword [ebp - 4], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
mov edi, 1
jne 0x401dc1
xor edx, edx
mov dword [ebp - 0x2f], edx
mov dword [ebp - 0x2b], edx
mov byte [ebp - 0x30], al
mov dword [ebp - 0x27], edx
mov word [ebp - 0x23], dx
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 4]
lea ecx, [ebp - 0x30]
push ecx
mov byte [ebp - 0x21], dl
lea edx, [ebp - 0xc]
push edx
push ebx
push ebx
push eax
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x20], 0x10
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x401db7
lea ecx, [ebp - 0x30]
push ecx
call dword [sym.imp.MSVCR71.dll_atoi]
add esp, 4
test eax, eax
je 0x401db7
mov byte [ebp - 5], 1
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, byte [ebp - 5]
test al, al
mov esi, dword [sym.imp.MSVCR71.dll__control87]
mov dword [ebp - 0x20], ebx
je 0x401de3
push ebx
push ebx
call esi
push 0x8001f
push edi
mov dword [ebp - 0x20], eax
call esi
add esp, 0x10
test byte [0x437f38], 1
jne 0x401e19
mov eax, dword [0x437f38]
push str.win_rpmain.cpp
or eax, edi
push str.WinMain
mov ecx, 0x424b10
mov dword [0x437f38], eax
call fcn.004019b0
push 0x40d2e0
call fcn.0040c9a0
add esp, 4
call fcn.004039d0
push eax
push 0x118
push str.Initial_Function_Checkpoint
mov ecx, 0x424b10
call fcn.00401000
cmp dword [0x424b08], ebx
jne 0x401e92
test byte [0x437f38], 2
jne 0x401e72
mov eax, dword [0x437f38]
push str.win_rpmain.cpp
or eax, 2
push 0x40e79f
mov ecx, 0x4116e0
mov dword [0x437f38], eax
call fcn.004019b0
push 0x40d2d0
call fcn.0040c9a0
add esp, 4
call fcn.004039d0
push eax
push 0x119
push str.____Start_section_Startup
mov ecx, 0x4116e0
call fcn.00401000
mov dword [0x424b08], edi
mov esi, dword [ebp + 0x10]
push esi
lea ecx, [ebp - 0x1c]
call fcn.00406520
push 0x3f
push esi
call dword [sym.imp.MSVCR71.dll_strchr]
add esp, 8
test eax, eax
je 0x401fe7
mov esi, dword [sym.imp.KERNEL32.dll_GetCommandLineW]
call esi
test eax, eax
je 0x401fe7
call esi
mov esi, eax
mov ax, word [esi]
cmp ax, 0x22
jne 0x401eed
nop
mov ax, word [esi + 2]
add esi, 2
cmp ax, 0x22
je 0x401ee8
cmp ax, bx
jne 0x401ed0
cmp ax, 0x22
jne 0x401efc
add esi, 2
jmp 0x401efc
cmp ax, 0x20
jbe 0x401efc
add esi, 2
cmp word [esi], 0x20
ja 0x401ef3
mov ax, word [esi]
cmp ax, bx
je 0x401f16
cmp ax, 0x20
ja 0x401f16
mov ax, word [esi + 2]
add esi, 2
cmp ax, bx
jne 0x401f04
push esi
call dword [sym.imp.MSVCR71.dll_wcslen]
add esp, 4
push 0
push 0
push 0
push 0
push eax
push esi
push 0
push 0
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebx, eax
inc ebx
push ebx
mov dword [ebp + 0x10], 0
call sub.MSVCR71.dll_void____cdecl_operator_new_unsigned_int_
mov edi, eax
mov ecx, ebx
mov edx, ecx
shr ecx, 2
xor eax, eax
mov dword [ebp - 0xc], edi
rep stosd dword es:[edi], eax
add esp, 4
mov ecx, edx
mov edx, dword [ebp - 0x10]
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [ebp - 0xc]
lea eax, [ebp + 0x10]
push eax
push 0
push ebx
push ecx
push edx
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x401fd9
cmp word [esi], 0x22
jne 0x401f8b
add esi, 2
push esi
call dword [sym.imp.MSVCR71.dll_wcslen]
lea eax, [esi + eax*2 - 2]
add esp, 4
cmp word [eax], 0x22
jne 0x401fa4
mov word [eax], 0
lea ecx, [ebp - 0x28]
call fcn.00406300
lea eax, [ebp - 0x28]
push eax
push esi
call fcn.0040b440
add esp, 8
lea ecx, [ebp - 0x28]
call fcn.00406310
test eax, eax
je 0x401fd1
lea ecx, [ebp - 0x28]
push ecx
lea ecx, [ebp - 0x1c]
call fcn.00406540
lea ecx, [ebp - 0x28]
call fcn.00406500
mov edx, dword [ebp - 0xc]
push edx
call sub.MSVCR71.dll_void___cdecl_operator_delete_void__
add esp, 4
xor ebx, ebx
cmp byte [ebp - 0x15], 0xff
lea esi, [ebp - 0x1c]
jne 0x401ff3
mov esi, dword [ebp - 0x1c]
lea eax, [ebp - 0x1c]
push eax
mov dword [ebp + 0x10], esi
call fcn.00401aa0
add esp, 4
test al, al
jne 0x4024a8
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x10], ebx
call fcn.00401a20
test eax, eax
jne 0x402090
cmp esi, ebx
je 0x402078
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402022
sub eax, edx
mov dword [ebp - 0x24], eax
je 0x402078
mov esi, dword [sym.imp.KERNEL32.dll_OpenMutexA]
xor edi, edi
jmp 0x402040
push str.RPStartupMutex
push 0
push 0x1f0001
call esi
mov ebx, eax
test ebx, ebx
mov dword [ebp - 0x10], ebx
je 0x40206d
push 0x2710
push ebx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 0x24], eax
jne 0x402093
inc edi
cmp edi, 5
jl 0x402040
jmp 0x402115
mov esi, dword [ebp - 0x10]
cmp esi, ebx
je 0x402127
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
jmp 0x402121
mov ebx, dword [ebp - 0x10]
mov ecx, dword [str.RPApplicationRunningMutex]
push ecx
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov esi, eax
mov dword [ebp - 0x24], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4020f0
mov edx, dword [ebp + 0x10]
push edx
call fcn.004089e0
add esp, 4
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
test ebx, ebx
je 0x4024a8
push ebx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push ebx
call esi
lea ecx, [ebp - 0x1c]
call fcn.00406500
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov edi, dword [sym.imp.USER32.dll_SetMessageQueue]
mov esi, 0x78
push esi
call edi
test eax, eax
jne 0x40213b
cmp esi, 8
jle 0x402113
sar esi, 1
push esi
call edi
test eax, eax
je 0x402102
cmp esi, 8
jge 0x40213b
test ebx, ebx
je 0x402127
push ebx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x1c]
call fcn.00406500
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
call fcn.004039d0
push eax
push 0x1cf
push str._Safe_Startup_EnumWindows___SetMessageQueue__
mov ecx, 0x424b10
call fcn.00401000
push 0
call dword [sym.imp.ole32.dll_OleInitialize]
call fcn.004039d0
push eax
push 0x1d4
push str._OleInitialize__
mov ecx, 0x424b10
call fcn.00401000
xor eax, eax
mov byte [ebp - 0x448], 0
mov ecx, 0xff
lea edi, [ebp - 0x447]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [str.RemovePluginHandlerData]
push eax
push 0
push 6
call fcn.004024c0
mov ecx, dword [str.SoftwareRealNetworks_s_d._dPreferences_s]
push eax
push ecx
lea edx, [ebp - 0x448]
push edx
call dword [sym.imp.MSVCR71.dll_sprintf]
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
add esp, 0x18
lea eax, [ebp - 4]
push eax
push 0x20019
push 0
lea ecx, [ebp - 0x448]
push ecx
push 0x80000001
mov dword [ebp - 4], 0
call esi
test eax, eax
je 0x4021fa
lea edx, [ebp - 4]
push edx
push 0x20019
push 0
lea eax, [ebp - 0x448]
push eax
push 0x80000000
call esi
xor esi, esi
cmp eax, esi
jne 0x40229c
xor ecx, ecx
mov dword [ebp - 0x43], ecx
mov dword [ebp - 0x3f], ecx
mov dword [ebp - 0x3b], ecx
mov word [ebp - 0x37], cx
lea edx, [ebp - 0xc]
push edx
mov edx, dword [ebp - 4]
lea eax, [ebp - 0x44]
push eax
mov byte [ebp - 0x35], cl
lea ecx, [ebp - 0x34]
push ecx
push esi
push esi
push edx
mov dword [ebp - 0x34], esi
mov byte [ebp - 0x44], 0
mov dword [ebp - 0xc], 0x10
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40224f
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.MSVCR71.dll_atoi]
add esp, 4
mov esi, eax
mov ecx, dword [ebp - 4]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ecx
call edi
test esi, esi
je 0x40229c
call fcn.00402a60
lea edx, [ebp - 4]
push edx
lea eax, [ebp - 0x448]
push eax
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x40229c
mov ecx, dword [ebp - 4]
push 1
push 0x40e848
push 1
push 0x40e79f
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueA]
mov edx, dword [ebp - 4]
push edx
call edi
lea eax, [ebp - 0x14]
xor esi, esi
push eax
mov dword [ebp - 0x14], esi
call fcn.00402bb0
add esp, 4
test eax, eax
jge 0x4022d6
mov ecx, dword [ebp + 8]
push ecx
call fcn.00401320
add esp, 4
test eax, eax
je 0x4022d6
mov edx, dword [ebp - 0x14]
push edx
call fcn.00402b40
lea eax, [ebp - 0x14]
push eax
call fcn.00402bb0
add esp, 8
mov edx, dword [ebp + 0x10]
sub esp, 8
mov ecx, esp
push edx
mov dword [ebp - 0xc], 1
call fcn.00406520
call fcn.00401620
add esp, 8
test eax, eax
jl 0x4022fa
mov dword [ebp - 0xc], esi
xor eax, eax
mov byte [ebp - 0xc48], 0
mov ecx, 0xff
lea edi, [ebp - 0xc47]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [str.InstallComplete]
push eax
push 0
push 6
call fcn.004024c0
mov ecx, dword [str.SoftwareRealNetworks_s_d._dPreferences_s]
push eax
push ecx
lea edx, [ebp - 0xc48]
push edx
call dword [sym.imp.MSVCR71.dll_sprintf]
add esp, 0x18
lea eax, [ebp - 4]
push eax
push 0x20019
push 0
lea ecx, [ebp - 0xc48]
push ecx
push 0x80000000
mov dword [ebp - 4], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
xor edi, edi
test eax, eax
jne 0x4023cc
xor edx, edx
mov dword [ebp - 0x43], edx
mov dword [ebp - 0x3f], edx
mov dword [ebp - 0x3b], edx
mov word [ebp - 0x37], dx
lea eax, [ebp - 0x34]
push eax
mov eax, dword [ebp - 4]
lea ecx, [ebp - 0x44]
push ecx
mov byte [ebp - 0x35], dl
lea edx, [ebp - 0x48]
push edx
push edi
push edi
push eax
xor esi, esi
mov dword [ebp - 0x48], edi
mov byte [ebp - 0x44], 0
mov dword [ebp - 0x34], 0x10
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4023b8
lea ecx, [ebp - 0x44]
push ecx
call dword [sym.imp.MSVCR71.dll_atoi]
add esp, 4
mov esi, eax
dec esi
neg esi
sbb esi, esi
neg esi
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp esi, edi
mov dword [ebp - 4], edi
je 0x4023cc
mov dword [ebp - 0xc], edi
call fcn.004039d0
push eax
push 0x223
push str._GetRPApp___finished
mov ecx, 0x424b10
call fcn.00401000
cmp dword [ebp - 0xc], edi
je 0x40245c
mov eax, dword [ebp - 0x14]
cmp eax, edi
je 0x402457
mov edx, dword [ebp + 0x10]
mov ecx, dword [eax]
push edx
mov edx, dword [ebp + 8]
push edx
push eax
call dword [ecx + 0xc]
test eax, eax
je 0x402457
call fcn.004039d0
push eax
push 0x22f
push str._InitRPAppInstance__
mov ecx, 0x424b10
call fcn.00401000
lea ecx, [ebp - 0x10]
call fcn.00401a70
call fcn.004039d0
push eax
push 0x234
push str.InitInstance__
mov ecx, 0x424b10
call fcn.00401000
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x10]
mov eax, dword [ebp - 0x14]
mov edx, dword [eax]
push eax
call dword [edx + 0x14]
mov ebx, dword [ebp - 0x10]
jmp 0x40245c
call fcn.00402a60
mov eax, dword [ebp - 0x14]
push eax
call fcn.00402b40
mov edi, dword [ebp - 0x24]
mov esi, dword [sym.imp.KERNEL32.dll_ReleaseMutex]
add esp, 4
push edi
call esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
call fcn.00401c60
call dword [sym.imp.ole32.dll_OleUninitialize]
mov al, byte [ebp - 5]
test al, al
je 0x40249e
mov ecx, dword [ebp - 0x20]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.MSVCR71.dll__control87]
add esp, 8
test ebx, ebx
je 0x4024a8
push ebx
call esi
push ebx
call edi
lea ecx, [ebp - 0x1c]
call fcn.00406500
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x10