Function at 0x401d10
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.004024e0
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 0x401de1
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 0x401dd7
lea ecx, [ebp - 0x30]
push ecx
call dword [sym.imp.MSVCR71.dll_atoi]
add esp, 4
test eax, eax
je 0x401dd7
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 0x401e03
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 0x401e39
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 0x40d300
call fcn.0040c9c0
add esp, 4
call fcn.004039f0
push eax
push 0x118
push str.Initial_Function_Checkpoint
mov ecx, 0x424b10
call fcn.00401000
cmp dword [0x424b08], ebx
jne 0x401eb2
test byte [0x437f38], 2
jne 0x401e92
mov eax, dword [0x437f38]
push str.win_rpmain.cpp
or eax, 2
push 0x40e7b7
mov ecx, 0x4116e0
mov dword [0x437f38], eax
call fcn.004019b0
push 0x40d2f0
call fcn.0040c9c0
add esp, 4
call fcn.004039f0
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.00406540
push 0x3f
push esi
call dword [sym.imp.MSVCR71.dll_strchr]
add esp, 8
test eax, eax
je 0x402007
mov esi, dword [sym.imp.KERNEL32.dll_GetCommandLineW]
call esi
test eax, eax
je 0x402007
call esi
mov esi, eax
mov ax, word [esi]
cmp ax, 0x22
jne 0x401f0d
nop
mov ax, word [esi + 2]
add esi, 2
cmp ax, 0x22
je 0x401f08
cmp ax, bx
jne 0x401ef0
cmp ax, 0x22
jne 0x401f1c
add esi, 2
jmp 0x401f1c
cmp ax, 0x20
jbe 0x401f1c
add esi, 2
cmp word [esi], 0x20
ja 0x401f13
mov ax, word [esi]
cmp ax, bx
je 0x401f36
cmp ax, 0x20
ja 0x401f36
mov ax, word [esi + 2]
add esi, 2
cmp ax, bx
jne 0x401f24
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 0x401ff9
cmp word [esi], 0x22
jne 0x401fab
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 0x401fc4
mov word [eax], 0
lea ecx, [ebp - 0x28]
call fcn.00406320
lea eax, [ebp - 0x28]
push eax
push esi
call fcn.0040b460
add esp, 8
lea ecx, [ebp - 0x28]
call fcn.00406330
test eax, eax
je 0x401ff1
lea ecx, [ebp - 0x28]
push ecx
lea ecx, [ebp - 0x1c]
call fcn.00406560
lea ecx, [ebp - 0x28]
call fcn.00406520
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 0x402013
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 0x4024c8
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x10], ebx
call fcn.00401a20
test eax, eax
jne 0x4020b0
cmp esi, ebx
je 0x402098
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402042
sub eax, edx
mov dword [ebp - 0x24], eax
je 0x402098
mov esi, dword [sym.imp.KERNEL32.dll_OpenMutexA]
xor edi, edi
jmp 0x402060
push str.RPStartupMutex
push 0
push 0x1f0001
call esi
mov ebx, eax
test ebx, ebx
mov dword [ebp - 0x10], ebx
je 0x40208d
push 0x2710
push ebx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 0x24], eax
jne 0x4020b3
inc edi
cmp edi, 5
jl 0x402060
jmp 0x402135
mov esi, dword [ebp - 0x10]
cmp esi, ebx
je 0x402147
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
jmp 0x402141
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 0x402110
mov edx, dword [ebp + 0x10]
push edx
call fcn.00408a00
add esp, 4
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
test ebx, ebx
je 0x4024c8
push ebx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push ebx
call esi
lea ecx, [ebp - 0x1c]
call fcn.00406520
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 0x40215b
cmp esi, 8
jle 0x402133
sar esi, 1
push esi
call edi
test eax, eax
je 0x402122
cmp esi, 8
jge 0x40215b
test ebx, ebx
je 0x402147
push ebx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x1c]
call fcn.00406520
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
call fcn.004039f0
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.004039f0
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.004024e0
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 0x40221a
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 0x4022bc
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 0x40226f
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 0x4022bc
call fcn.00402a80
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 0x4022bc
mov ecx, dword [ebp - 4]
push 1
push 0x40e860
push 1
push 0x40e7b7
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.00402bd0
add esp, 4
test eax, eax
jge 0x4022f6
mov ecx, dword [ebp + 8]
push ecx
call fcn.00401320
add esp, 4
test eax, eax
je 0x4022f6
mov edx, dword [ebp - 0x14]
push edx
call fcn.00402b60
lea eax, [ebp - 0x14]
push eax
call fcn.00402bd0
add esp, 8
mov edx, dword [ebp + 0x10]
sub esp, 8
mov ecx, esp
push edx
mov dword [ebp - 0xc], 1
call fcn.00406540
call fcn.00401620
add esp, 8
test eax, eax
jl 0x40231a
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.004024e0
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 0x4023ec
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 0x4023d8
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 0x4023ec
mov dword [ebp - 0xc], edi
call fcn.004039f0
push eax
push 0x223
push str._GetRPApp___finished
mov ecx, 0x424b10
call fcn.00401000
cmp dword [ebp - 0xc], edi
je 0x40247c
mov eax, dword [ebp - 0x14]
cmp eax, edi
je 0x402477
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 0x402477
call fcn.004039f0
push eax
push 0x22f
push str._InitRPAppInstance__
mov ecx, 0x424b10
call fcn.00401000
lea ecx, [ebp - 0x10]
call fcn.00401a70
call fcn.004039f0
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 0x40247c
call fcn.00402a80
mov eax, dword [ebp - 0x14]
push eax
call fcn.00402b60
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.00401c80
call dword [sym.imp.ole32.dll_OleUninitialize]
mov al, byte [ebp - 5]
test al, al
je 0x4024be
mov ecx, dword [ebp - 0x20]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.MSVCR71.dll__control87]
add esp, 8
test ebx, ebx
je 0x4024c8
push ebx
call esi
push ebx
call edi
lea ecx, [ebp - 0x1c]
call fcn.00406520
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x10