Function at 0x40cb60
Capabilities:
Accept command line arguments
Check mutex on windows
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42e95b
mov eax, dword fs:[0]
push eax
sub esp, 0x888
mov eax, dword [0x441064]
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 esi, dword [ebp + 8]
call fcn.0040cae0
test eax, eax
je 0x40cba2
or eax, 0xffffffff
jmp 0x40d660
xor ecx, ecx
mov dword [ebp - 0x860], 0
mov ebx, 5
mov dword [ebp - 0x86c], ecx
xor eax, eax
mov dword [ebp - 0x858], ecx
mov dword [ebp - 0x854], ecx
mov dword [ebp - 0x864], ecx
mov dword [ebp - 0x878], ecx
mov dword [ebp - 0x88c], ecx
mov dword [ebp - 0x870], ecx
mov dword [ebp - 0x874], ecx
mov dword [ebp - 0x894], ecx
mov dword [ebp - 0x888], 0xffffffff
mov dword [ebp - 0x868], ebx
mov dword [ebp - 0x838], ecx
mov dword [ebp - 0x834], 7
mov word [ebp - 0x848], ax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x860]
push eax
mov dword [ebp - 0x884], 1
mov dword [0x4429d4], esi
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov edx, eax
mov dword [ebp - 0x84c], edx
test edx, edx
jne 0x40cc79
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40cc5a
movzx esi, si
or esi, 0x80070000
test esi, esi
mov eax, 0x80004005
cmovns esi, eax
push esi
push 0x50f
push str.c:_buildagentwork9efead2954b58eab_setupexe_setupexe.cpp
call fcn.0040ebe0
jmp 0x40d5df
mov esi, 1
cmp dword [ebp - 0x860], esi
jle 0x40d3d4
mov edi, dword [sym.imp.KERNEL32.dll_CompareStringW]
lea eax, [esi*4]
mov edx, dword [eax + edx]
mov dword [ebp - 0x850], eax
movzx eax, word [edx]
cmp eax, 0x2d
je 0x40ccb1
cmp eax, 0x2f
jne 0x40d3ca
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x87c], eax
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ccc0
sub ecx, dword [ebp - 0x87c]
sar ecx, 1
cmp ecx, 1
jbe 0x40d3ca
push 0xffffffffffffffff
push 0x43def4
push 0xffffffffffffffff
lea eax, [edx + 2]
push eax
push 1
push 0x7f
call edi
cmp eax, 2
je 0x40d222
mov ecx, dword [ebp - 0x84c]
mov eax, dword [ebp - 0x850]
push 0xffffffffffffffff
push str.extract
push 0xffffffffffffffff
mov eax, dword [eax + ecx]
add eax, 2
push eax
push 1
push 0x7f
call edi
cmp eax, 2
je 0x40d222
mov ecx, dword [ebp - 0x84c]
mov eax, dword [ebp - 0x850]
push 0xffffffffffffffff
push 0x43df0c
push 0xffffffffffffffff
mov eax, dword [eax + ecx]
add eax, 2
push eax
push 1
push 0x7f
call edi
cmp eax, 2
je 0x40d222
mov ecx, dword [ebp - 0x84c]
mov eax, dword [ebp - 0x850]
push 0xffffffffffffffff
push str.msicl
push 0xffffffffffffffff
mov eax, dword [eax + ecx]
add eax, 2
push eax
push 1
push 0x7f
call edi
cmp eax, 2
jne 0x40cea8
mov edx, dword [ebp - 0x84c]
lea ecx, [esi + 1]
cmp ecx, dword [ebp - 0x860]
jge 0x40ce2a
mov eax, dword [ebp - 0x850]
mov eax, dword [eax + edx + 4]
movzx eax, word [eax]
test ax, ax
je 0x40ce2a
cmp eax, 0x2d
je 0x40d27f
cmp eax, 0x2f
je 0x40ce2a
mov esi, ecx
mov edx, dword [edx + esi*4]
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x87c], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40cdc6
sub ecx, dword [ebp - 0x87c]
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x848]
call fcn.004018c0
lea ecx, [ebp - 0x848]
call fcn.00409ec0
push 0x43d738
lea ecx, [ebp - 0x848]
call fcn.00401a10
cmp dword [ebp - 0x834], 8
lea eax, [ebp - 0x848]
push 0
cmovae eax, dword [ebp - 0x848]
push eax
lea eax, [ebp - 0x864]
push eax
call fcn.0040de20
mov edx, dword [ebp - 0x84c]
mov ecx, dword [ebp - 0x858]
mov eax, dword [ebp - 0x854]
inc esi
cmp esi, dword [ebp - 0x860]
jl 0x40cc90
test ecx, ecx
je 0x40d290
lea eax, [ebp - 0x870]
push eax
push 0xc739
push dword [0x4429d4]
call fcn.0040e380
mov esi, eax
test esi, esi
js 0x40d5df
lea eax, [ebp - 0x874]
push eax
push 0x7d5
push dword [0x4429d4]
call fcn.0040e380
mov esi, eax
test esi, esi
js 0x40d5df
push 0
push dword [ebp - 0x870]
push dword [ebp - 0x874]
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x40d5df
mov ecx, dword [ebp - 0x84c]
mov eax, dword [ebp - 0x850]
push 0xffffffffffffffff
push str.forcequiet
push 0xffffffffffffffff
mov eax, dword [eax + ecx]
add eax, 2
push eax
push 1
push 0x7f
call edi
cmp eax, 2
jne 0x40cee3
mov ebx, eax
push 0
mov dword [ebp - 0x868], ebx
push str.INSTALL_FROM_BROyes
jmp 0x40ce18
mov ecx, dword [ebp - 0x84c]
mov eax, dword [ebp - 0x850]
push 0xffffffffffffffff
push str.quiet
push 0xffffffffffffffff
mov eax, dword [eax + ecx]
add eax, 2
push eax
push 1
push 0x7f
call edi
cmp eax, 2
jne 0x40cf17
mov ebx, eax
mov dword [ebp - 0x868], ebx
jmp 0x40ce24
mov ecx, dword [ebp - 0x84c]
mov eax, dword [ebp - 0x850]
push 0xffffffffffffffff
push str.passive
push 0xffffffffffffffff
mov eax, dword [eax + ecx]
add eax, 2
push eax
push 1
push 0x7f
call edi
cmp eax, 2
jne 0x40cfb8
lea eax, [ebp - 0x85c]
xor ebx, ebx
push eax
push 8
mov dword [ebp - 0x85c], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x40cf95
lea eax, [ebp - 0x890]
mov dword [ebp - 0x890], 4
push eax
push 4
lea eax, [ebp - 0x880]
push eax
push 0x14
push dword [ebp - 0x85c]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
cmovne ebx, dword [ebp - 0x880]
mov eax, dword [ebp - 0x85c]
test eax, eax
je 0x40cfa6
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
neg ebx
sbb ebx, ebx
add ebx, 3
mov dword [ebp - 0x868], ebx
jmp 0x40ce24
mov ecx, dword [ebp - 0x84c]
mov eax, dword [ebp - 0x850]
push 0xffffffffffffffff
push str.norestart
push 0xffffffffffffffff
mov eax, dword [eax + ecx]
add eax, 2
push eax
push 1
push 0x7f
call edi
cmp eax, 2
jne 0x40cfeb
push 0
push str.REBOOTReallySuppress
jmp 0x40ce18
mov ecx, dword [ebp - 0x84c]
mov eax, dword [ebp - 0x850]
push 0xffffffffffffffff
push str.forcerestart
push 0xffffffffffffffff
mov eax, dword [eax + ecx]
add eax, 2
push eax
push 1
push 0x7f
call edi
cmp eax, 2
jne 0x40d01e
push 0
push str.REBOOTForce
jmp 0x40ce18
mov ecx, dword [ebp - 0x84c]
mov eax, dword [ebp - 0x850]
push 0xffffffffffffffff
push str.promptrestart
push 0xffffffffffffffff
mov eax, dword [eax + ecx]
add eax, 2
push eax
push 1
push 0x7f
call edi
cmp eax, 2
jne 0x40d051
push 0
push str.REBOOTPROMPT
jmp 0x40ce18
mov ecx, dword [ebp - 0x84c]
mov eax, dword [ebp - 0x850]
push 0xffffffffffffffff
push str.uninstall
push 0xffffffffffffffff
mov eax, dword [eax + ecx]
add eax, 2
push eax
push 1
push 0x7f
call edi
cmp eax, 2
jne 0x40d098
cmp ebx, 5
mov dword [ebp - 0x884], 7
mov eax, 3
cmove ebx, eax
mov dword [ebp - 0x868], ebx
jmp 0x40ce24
mov ecx, dword [ebp - 0x84c]
mov eax, dword [ebp - 0x850]
push 0xffffffffffffffff
push 0x43dca4
push 0xffffffffffffffff
mov eax, dword [eax + ecx]
add eax, 2
push eax
push 1
push 0x7f
call edi
cmp eax, 2
jne 0x40d114
mov edx, dword [ebp - 0x84c]
lea ecx, [esi + 1]
cmp ecx, dword [ebp - 0x860]
jge 0x40ce2a
mov eax, dword [ebp - 0x850]
mov eax, dword [eax + edx + 4]
movzx eax, word [eax]
test ax, ax
je 0x40ce2a
cmp eax, 0x2d
je 0x40ce2a
cmp eax, 0x2f
je 0x40ce2a
mov esi, ecx
lea eax, [ebp - 0x878]
push 0
push dword [edx + esi*4]
push eax
call fcn.0040e0a0
jmp 0x40ce24
mov ecx, dword [ebp - 0x84c]
mov eax, dword [ebp - 0x850]
push 0xffffffffffffffff
push 0x43e078
push 0xffffffffffffffff
mov eax, dword [eax + ecx]
add eax, 2
push eax
push 1
push 0x7f
call edi
cmp eax, 2
jne 0x40d193
inc esi
cmp esi, dword [ebp - 0x860]
jge 0x40d3ca
mov eax, dword [ebp - 0x850]
mov ecx, dword [ebp - 0x84c]
mov eax, dword [eax + ecx + 4]
movzx eax, word [eax]
test ax, ax
je 0x40d3ca
cmp eax, 0x2d
je 0x40d3ca
cmp eax, 0x2f
je 0x40d3ca
push dword [ecx + esi*4]
call fcn.0041e9c3
add esp, 4
mov dword [ebp - 0x888], eax
mov dword [ebp - 4], 0
jmp 0x40ce24
mov ecx, dword [ebp - 0x84c]
mov eax, dword [ebp - 0x850]
push 0xffffffffffffffff
push 0x43e084
push 0xffffffffffffffff
mov eax, dword [eax + ecx]
add eax, 2
push eax
push 1
push 0x7f
call edi
cmp eax, 2
je 0x40d20c
mov ecx, dword [ebp - 0x84c]
mov eax, dword [ebp - 0x850]
push 0xffffffffffffffff
push 0x43e088
push 0xffffffffffffffff
mov eax, dword [eax + ecx]
add eax, 2
push eax
push 1
push 0x7f
call edi
cmp eax, 2
je 0x40d20c
mov ecx, dword [ebp - 0x84c]
mov eax, dword [ebp - 0x850]
push 0xffffffffffffffff
push 0x43e08c
push 0xffffffffffffffff
mov eax, dword [eax + ecx]
add eax, 2
push eax
push 1
push 0x7f
call edi
cmp eax, 2
jne 0x40d3ca
mov edx, dword [ebp - 0x84c]
mov ecx, 1
mov dword [ebp - 0x858], ecx
jmp 0x40ce30
lea ecx, [esi + 1]
cmp ecx, dword [ebp - 0x860]
jge 0x40d395
mov eax, dword [ebp - 0x850]
mov edx, dword [ebp - 0x84c]
mov eax, dword [eax + edx + 4]
movzx eax, word [eax]
test ax, ax
je 0x40d395
cmp eax, 0x2d
je 0x40d395
cmp eax, 0x2f
je 0x40d395
mov esi, ecx
mov dword [ebp - 0x86c], 1
mov ecx, dword [ebp - 0x858]
mov eax, dword [edx + esi*4]
mov dword [ebp - 0x854], eax
jmp 0x40ce36
mov eax, dword [ebp - 0x854]
mov ecx, dword [ebp - 0x858]
jmp 0x40ce36
cmp dword [ebp - 0x86c], 0
je 0x40d3d4
push 0
push eax
mov dword [ebp - 0x85c], 0
mov dword [ebp - 0x880], 0
mov dword [ebp - 0x850], 0
call fcn.0040ead0
mov esi, eax
test esi, esi
js 0x40d37c
lea eax, [ebp - 0x880]
push eax
lea eax, [ebp - 0x85c]
push eax
push str.MANIFEST
push 0
call fcn.0040e240
mov esi, eax
test esi, esi
js 0x40d37c
mov ecx, dword [ebp - 0x85c]
xor bl, bl
cmp byte [ecx + 1], bl
jbe 0x40d37c
movzx eax, bl
lea edi, [ecx + 4]
imul eax, eax, 0xa8
push 0
push dword [ebp - 0x854]
add edi, eax
lea eax, [ebp - 0x850]
push eax
call fcn.0040e0a0
mov esi, eax
test esi, esi
js 0x40d37c
push 0
push 0x43cbe4
lea eax, [ebp - 0x850]
push eax
call fcn.0040de20
mov esi, eax
test esi, esi
js 0x40d37c
push 0
lea eax, [edi + 0xc]
push eax
lea eax, [ebp - 0x850]
push eax
call fcn.0040de20
mov esi, eax
test esi, esi
js 0x40d37c
push 2
push dword [ebp - 0x850]
push edi
call fcn.0040e130
mov esi, eax
test esi, esi
js 0x40d37c
mov ecx, dword [ebp - 0x85c]
inc bl
cmp bl, byte [ecx + 1]
jb 0x40d302
mov eax, dword [ebp - 0x850]
test eax, eax
je 0x40d5df
push eax
call fcn.0040e120
jmp 0x40d5df
push 0x104
lea eax, [ebp - 0x114]
push 0
push eax
call fcn.00412cd0
mov eax, dword [ebp - 0x84c]
push dword [eax + esi*4]
lea eax, [ebp - 0x114]
push str.Must_specify_a_filename_with_the__s_switch.
push 0x104
push eax
call fcn.00401c10
add esp, 0x1c
mov esi, 0x80070057
jmp 0x40d5df
lea eax, [ebp - 0x894]
push eax
lea eax, [ebp - 0x88c]
push eax
push 0xc73a
push 0
call fcn.0040e240
mov esi, eax
mov dword [ebp - 0x85c], esi
cmp esi, 0x80070716
jne 0x40d408
xor esi, esi
mov dword [ebp - 0x85c], esi
jmp 0x40d410
test esi, esi
js 0x40d5df
call fcn.0040a7d0
test eax, eax
jne 0x40d5df
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor ebx, ebx
mov dword [ebp - 0x850], ebx
lea ebx, [eax + 0x1e]
push str.IsMSISrvFree___In
call edi
push str.Global_MSIExecute
push 0
push 0x1f0001
call dword [sym.imp.KERNEL32.dll_OpenMutexW]
mov dword [ebp - 0x86c], eax
test eax, eax
je 0x40d55c
push 0
push str.IsMSISrvFree___:_Mutex_is_opened__GetLastError_____d_n
lea eax, [ebp - 0x830]
push 0x104
push eax
call fcn.00409270
add esp, 0x10
lea eax, [ebp - 0x830]
push eax
call edi
mov esi, dword [ebp - 0x86c]
nop
push 0x7530
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edi, eax
cmp edi, 0x102
ja 0x40d4db
je 0x40d4d2
test edi, edi
je 0x40d4c1
cmp edi, 0x80
jne 0x40d504
push str.IsMSISrvFree___:_WAIT_ABANDONED__iCount_set_to_0._n
lea eax, [ebp - 0x830]
xor ebx, ebx
push 0x104
push eax
call fcn.00409270
add esp, 0xc
jmp 0x40d504
mov dword [ebp - 0x850], 1
push str.IsMSISrvFree___:_Mutex_is_closed__iCount_set_to_0._n
jmp 0x40d4a9
dec ebx
push ebx
push str.IsMSISrvFree___:_WAIT_TIMEOUT__iCount___d_n
jmp 0x40d4f0
cmp edi, 0xffffffff
jne 0x40d504
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push str.IsMSISrvFree___:_WAIT_FAILED__iCount_set_to_0__ret___d_n
lea eax, [ebp - 0x830]
push 0x104
push eax
call fcn.00409270
add esp, 0x10
lea eax, [ebp - 0x830]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
test ebx, ebx
jne 0x40d480
push edi
push str._nIsMSISrvFree___:_Do_not_wait_any_more._n_n
lea eax, [ebp - 0x830]
push 0x104
push eax
call fcn.00409270
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea eax, [ebp - 0x830]
add esp, 0x10
push eax
call edi
push dword [ebp - 0x86c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x85c]
mov ebx, dword [ebp - 0x850]
jmp 0x40d58a
mov ebx, 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.IsMSISrvFree___:_OpenMutex___err_ret___d_n
lea eax, [ebp - 0x830]
push 0x104
push eax
call fcn.00409270
add esp, 0x10
lea eax, [ebp - 0x830]
push eax
call edi
push ebx
push str.IsMSISrvFree___Out_ret___d_n
lea eax, [ebp - 0x830]
push 0x104
push eax
call fcn.00409270
add esp, 0x10
lea eax, [ebp - 0x830]
push eax
call edi
test ebx, ebx
je 0x40d5df
push dword [ebp - 0x884]
mov edx, dword [ebp - 0x864]
push dword [ebp - 0x868]
mov ecx, dword [ebp - 0x88c]
push dword [ebp - 0x878]
push dword [ebp - 0x888]
call fcn.0040bc40
add esp, 0x10
mov esi, eax
mov eax, dword [ebp - 0x864]
test eax, eax
je 0x40d5ef
push eax
call fcn.0040e120
mov eax, dword [ebp - 0x870]
test eax, eax
je 0x40d5ff
push eax
call fcn.0040e120
mov eax, dword [ebp - 0x874]
test eax, eax
je 0x40d60f
push eax
call fcn.0040e120
mov eax, dword [ebp - 0x878]
test eax, eax
je 0x40d61f
push eax
call fcn.0040e120
mov edx, dword [ebp - 0x834]
movzx esi, si
cmp edx, 8
jb 0x40d65e
mov ecx, dword [ebp - 0x848]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40d654
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40d67e
push edx
push ecx
call fcn.00410ba9
add esp, 8
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.00410b68
mov esp, ebp
pop ebp
ret 0x10
call fcn.00417ed8
int3