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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42f47b
mov eax, dword fs:[0]
push eax
sub esp, 0x97c
mov eax, dword [0x441070]
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.0040ca80
test eax, eax
je 0x40cb42
or eax, 0xffffffff
jmp 0x40d550
xor eax, eax
mov dword [ebp - 0x964], 0
mov dword [ebp - 0x958], 0
mov dword [ebp - 0x954], 0
mov dword [ebp - 0x95c], 0
mov dword [ebp - 0x968], 0
mov dword [ebp - 0x978], 0
mov dword [ebp - 0x984], 0
mov dword [ebp - 0x970], 0
mov dword [ebp - 0x974], 0
mov dword [ebp - 0x988], 0
mov dword [ebp - 0x980], 0xffffffff
mov dword [ebp - 0x960], 5
mov dword [ebp - 0x93c], 0
mov dword [ebp - 0x938], 7
mov word [ebp - 0x94c], ax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x964]
push eax
mov dword [ebp - 0x97c], 1
mov dword [0x442afc], esi
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov ebx, eax
test ebx, ebx
jne 0x40cc38
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40cc19
movzx esi, si
or esi, 0x80070000
test esi, esi
mov eax, 0x80004005
cmovns esi, eax
push esi
push 0x50f
push str.c:_buildagentwork_ff5fabc9ec27ac7d_setupexe_setupexe.cpp
call fcn.0040eb40
jmp 0x40d4cf
mov esi, 1
cmp dword [ebp - 0x964], esi
jle 0x40d2bc
mov edi, dword [sym.imp.KERNEL32.dll_CompareStringW]
nop
lea eax, [esi*4]
mov edx, dword [eax + ebx]
mov dword [ebp - 0x950], eax
movzx eax, word [edx]
cmp eax, 0x2d
je 0x40cc71
cmp eax, 0x2f
jne 0x40d2b2
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x96c], eax
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40cc80
sub ecx, dword [ebp - 0x96c]
sar ecx, 1
cmp ecx, 1
jbe 0x40d2b2
push 0xffffffffffffffff
push 0x43db54
push 0xffffffffffffffff
lea eax, [edx + 2]
push eax
push 1
push 0x7f
call edi
cmp eax, 2
je 0x40d109
mov eax, dword [ebp - 0x950]
push 0xffffffffffffffff
push str.extract
push 0xffffffffffffffff
mov eax, dword [eax + ebx]
add eax, 2
push eax
push 1
push 0x7f
call edi
cmp eax, 2
je 0x40d109
mov eax, dword [ebp - 0x950]
push 0xffffffffffffffff
push 0x43db6c
push 0xffffffffffffffff
mov eax, dword [eax + ebx]
add eax, 2
push eax
push 1
push 0x7f
call edi
cmp eax, 2
je 0x40d109
mov eax, dword [ebp - 0x950]
push 0xffffffffffffffff
push str.msicl
push 0xffffffffffffffff
mov eax, dword [eax + ebx]
add eax, 2
push eax
push 1
push 0x7f
call edi
cmp eax, 2
jne 0x40ce52
lea ecx, [esi + 1]
cmp ecx, dword [ebp - 0x964]
jge 0x40cdce
mov eax, dword [ebp - 0x950]
mov eax, dword [eax + ebx + 4]
movzx eax, word [eax]
test ax, ax
je 0x40d161
cmp eax, 0x2d
je 0x40cdce
cmp eax, 0x2f
je 0x40cdce
mov esi, ecx
mov edx, dword [ebx + esi*4]
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x96c], eax
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40cd70
sub ecx, dword [ebp - 0x96c]
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x94c]
call fcn.004018a0
lea ecx, [ebp - 0x94c]
call fcn.00409e40
push 0x43d398
lea ecx, [ebp - 0x94c]
call fcn.004019f0
cmp dword [ebp - 0x938], 8
lea eax, [ebp - 0x94c]
push 0
cmovae eax, dword [ebp - 0x94c]
push eax
lea eax, [ebp - 0x968]
push eax
call fcn.0040dd70
mov ecx, dword [ebp - 0x954]
mov edx, dword [ebp - 0x958]
mov eax, dword [ebp - 0x95c]
inc esi
cmp esi, dword [ebp - 0x964]
jl 0x40cc50
test ecx, ecx
je 0x40d178
lea eax, [ebp - 0x970]
push eax
push 0xc739
push dword [0x442afc]
call fcn.0040e2e0
mov esi, eax
test esi, esi
js 0x40d4cf
lea eax, [ebp - 0x974]
push eax
push 0x7d5
push dword [0x442afc]
call fcn.0040e2e0
mov esi, eax
test esi, esi
js 0x40d4cf
push 0
push dword [ebp - 0x970]
push dword [ebp - 0x974]
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x40d4cf
mov eax, dword [ebp - 0x950]
push 0xffffffffffffffff
push str.forcequiet
push 0xffffffffffffffff
mov eax, dword [eax + ebx]
add eax, 2
push eax
push 1
push 0x7f
call edi
cmp eax, 2
jne 0x40ce85
push 0
mov dword [ebp - 0x960], eax
push str.INSTALL_FROM_BROyes
jmp 0x40cdc2
mov eax, dword [ebp - 0x950]
push 0xffffffffffffffff
push str.quiet
push 0xffffffffffffffff
mov eax, dword [eax + ebx]
add eax, 2
push eax
push 1
push 0x7f
call edi
cmp eax, 2
jne 0x40ceb1
mov dword [ebp - 0x960], eax
jmp 0x40cdce
mov eax, dword [ebp - 0x950]
push 0xffffffffffffffff
push str.passive
push 0xffffffffffffffff
mov eax, dword [eax + ebx]
add eax, 2
push eax
push 1
push 0x7f
call edi
cmp eax, 2
jne 0x40cee1
mov dword [ebp - 0x960], 3
jmp 0x40cdce
mov eax, dword [ebp - 0x950]
push 0xffffffffffffffff
push str.norestart
push 0xffffffffffffffff
mov eax, dword [eax + ebx]
add eax, 2
push eax
push 1
push 0x7f
call edi
cmp eax, 2
jne 0x40cf0e
push 0
push str.REBOOTReallySuppress
jmp 0x40cdc2
mov eax, dword [ebp - 0x950]
push 0xffffffffffffffff
push str.forcerestart
push 0xffffffffffffffff
mov eax, dword [eax + ebx]
add eax, 2
push eax
push 1
push 0x7f
call edi
cmp eax, 2
jne 0x40cf3b
push 0
push str.REBOOTForce
jmp 0x40cdc2
mov eax, dword [ebp - 0x950]
push 0xffffffffffffffff
push str.promptrestart
push 0xffffffffffffffff
mov eax, dword [eax + ebx]
add eax, 2
push eax
push 1
push 0x7f
call edi
cmp eax, 2
jne 0x40cf68
push 0
push str.REBOOTPROMPT
jmp 0x40cdc2
mov eax, dword [ebp - 0x950]
push 0xffffffffffffffff
push str.uninstall
push 0xffffffffffffffff
mov eax, dword [eax + ebx]
add eax, 2
push eax
push 1
push 0x7f
call edi
cmp eax, 2
jne 0x40cfaf
mov eax, dword [ebp - 0x960]
mov ecx, 3
cmp eax, 5
mov dword [ebp - 0x97c], 7
cmove eax, ecx
mov dword [ebp - 0x960], eax
jmp 0x40cdce
mov eax, dword [ebp - 0x950]
push 0xffffffffffffffff
push 0x43d904
push 0xffffffffffffffff
mov eax, dword [eax + ebx]
add eax, 2
push eax
push 1
push 0x7f
call edi
cmp eax, 2
jne 0x40d01f
lea ecx, [esi + 1]
cmp ecx, dword [ebp - 0x964]
jge 0x40cdce
mov eax, dword [ebp - 0x950]
mov eax, dword [eax + ebx + 4]
movzx eax, word [eax]
test ax, ax
je 0x40cdce
cmp eax, 0x2d
je 0x40cdce
cmp eax, 0x2f
je 0x40cdce
mov esi, ecx
lea eax, [ebp - 0x978]
push 0
push dword [ebx + esi*4]
push eax
call fcn.0040dff0
jmp 0x40cdce
mov eax, dword [ebp - 0x950]
push 0xffffffffffffffff
push str.lang
push 0xffffffffffffffff
mov eax, dword [eax + ebx]
add eax, 2
push eax
push 1
push 0x7f
call edi
cmp eax, 2
jne 0x40d092
inc esi
cmp esi, dword [ebp - 0x964]
jge 0x40d2b2
mov eax, dword [ebp - 0x950]
mov eax, dword [eax + ebx + 4]
movzx eax, word [eax]
test ax, ax
je 0x40d2b2
cmp eax, 0x2d
je 0x40d2b2
cmp eax, 0x2f
je 0x40d2b2
push dword [ebx + esi*4]
call fcn.0041f523
add esp, 4
mov dword [ebp - 0x980], eax
mov dword [ebp - 4], 0
jmp 0x40cdce
mov eax, dword [ebp - 0x950]
push 0xffffffffffffffff
push 0x43dce4
push 0xffffffffffffffff
mov eax, dword [eax + ebx]
add eax, 2
push eax
push 1
push 0x7f
call edi
cmp eax, 2
je 0x40d0f9
mov eax, dword [ebp - 0x950]
push 0xffffffffffffffff
push 0x43dce8
push 0xffffffffffffffff
mov eax, dword [eax + ebx]
add eax, 2
push eax
push 1
push 0x7f
call edi
cmp eax, 2
je 0x40d0f9
mov eax, dword [ebp - 0x950]
push 0xffffffffffffffff
push 0x43dcec
push 0xffffffffffffffff
mov eax, dword [eax + ebx]
add eax, 2
push eax
push 1
push 0x7f
call edi
cmp eax, 2
jne 0x40d2b2
mov ecx, 1
mov dword [ebp - 0x954], ecx
jmp 0x40cdd4
lea ecx, [esi + 1]
cmp ecx, dword [ebp - 0x964]
jge 0x40d283
mov eax, dword [ebp - 0x950]
mov eax, dword [eax + ebx + 4]
movzx eax, word [eax]
test ax, ax
je 0x40d283
cmp eax, 0x2d
je 0x40d283
cmp eax, 0x2f
je 0x40d283
mov esi, ecx
mov edx, 1
mov ecx, dword [ebp - 0x954]
mov dword [ebp - 0x958], edx
mov eax, dword [ebx + esi*4]
mov dword [ebp - 0x95c], eax
jmp 0x40cde0
mov eax, dword [ebp - 0x95c]
mov edx, dword [ebp - 0x958]
mov ecx, dword [ebp - 0x954]
jmp 0x40cde0
test edx, edx
je 0x40d2bc
push 0
push eax
mov dword [ebp - 0x950], 0
mov dword [ebp - 0x96c], 0
mov dword [ebp - 0x960], 0
call fcn.0040ea30
mov esi, eax
test esi, esi
js 0x40d26a
lea eax, [ebp - 0x96c]
push eax
lea eax, [ebp - 0x950]
push eax
push str.MANIFEST
push 0
call fcn.0040e1a0
mov esi, eax
test esi, esi
js 0x40d26a
mov ecx, dword [ebp - 0x950]
xor bl, bl
cmp byte [ecx + 1], bl
jbe 0x40d26a
nop word [eax + eax]
movzx eax, bl
lea edi, [ecx + 4]
imul eax, eax, 0xa8
push 0
push dword [ebp - 0x95c]
add edi, eax
lea eax, [ebp - 0x960]
push eax
call fcn.0040dff0
mov esi, eax
test esi, esi
js 0x40d26a
push 0
push 0x43c844
lea eax, [ebp - 0x960]
push eax
call fcn.0040dd70
mov esi, eax
test esi, esi
js 0x40d26a
push 0
lea eax, [edi + 0xc]
push eax
lea eax, [ebp - 0x960]
push eax
call fcn.0040dd70
mov esi, eax
test esi, esi
js 0x40d26a
push 2
push dword [ebp - 0x960]
push edi
call fcn.0040e090
mov esi, eax
test esi, esi
js 0x40d26a
mov ecx, dword [ebp - 0x950]
inc bl
cmp bl, byte [ecx + 1]
jb 0x40d1f0
mov eax, dword [ebp - 0x960]
test eax, eax
je 0x40d4cf
push eax
call fcn.0040e080
jmp 0x40d4cf
push 0x104
lea eax, [ebp - 0x114]
push 0
push eax
call fcn.00412cb0
push dword [ebx + esi*4]
lea eax, [ebp - 0x114]
push str.Must_specify_a_filename_with_the__s_switch.
push 0x104
push eax
call fcn.00401bf0
add esp, 0x1c
mov esi, 0x80070057
jmp 0x40d4cf
lea eax, [ebp - 0x988]
push eax
lea eax, [ebp - 0x984]
push eax
push 0xc73a
push 0
call fcn.0040e1a0
mov esi, eax
mov dword [ebp - 0x958], esi
cmp esi, 0x80070716
jne 0x40d2f0
xor esi, esi
mov dword [ebp - 0x958], esi
jmp 0x40d2f8
test esi, esi
js 0x40d4cf
call fcn.0040a760
test eax, eax
jne 0x40d4cf
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor ebx, ebx
mov dword [ebp - 0x954], 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 - 0x950], eax
test eax, eax
je 0x40d44c
push 0
push str.IsMSISrvFree___:_Mutex_is_opened__GetLastError_____d_n
lea eax, [ebp - 0x934]
push 0x104
push eax
call fcn.00409210
add esp, 0x10
lea eax, [ebp - 0x934]
push eax
call edi
mov esi, dword [ebp - 0x950]
nop word [eax + eax]
push 0x7530
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edi, eax
cmp edi, 0x102
ja 0x40d3cb
je 0x40d3c2
test edi, edi
je 0x40d3b1
cmp edi, 0x80
jne 0x40d3f4
push str.IsMSISrvFree___:_WAIT_ABANDONED__iCount_set_to_0._n
lea eax, [ebp - 0x934]
xor ebx, ebx
push 0x104
push eax
call fcn.00409210
add esp, 0xc
jmp 0x40d3f4
mov dword [ebp - 0x954], 1
push str.IsMSISrvFree___:_Mutex_is_closed__iCount_set_to_0._n
jmp 0x40d399
dec ebx
push ebx
push str.IsMSISrvFree___:_WAIT_TIMEOUT__iCount___d_n
jmp 0x40d3e0
cmp edi, 0xffffffff
jne 0x40d3f4
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 - 0x934]
push 0x104
push eax
call fcn.00409210
add esp, 0x10
lea eax, [ebp - 0x934]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
test ebx, ebx
jne 0x40d370
push edi
push str._nIsMSISrvFree___:_Do_not_wait_any_more._n_n
lea eax, [ebp - 0x934]
push 0x104
push eax
call fcn.00409210
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea eax, [ebp - 0x934]
add esp, 0x10
push eax
call edi
push dword [ebp - 0x950]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x958]
mov ebx, dword [ebp - 0x954]
jmp 0x40d47a
mov ebx, 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.IsMSISrvFree___:_OpenMutex___err_ret___d_n
lea eax, [ebp - 0x934]
push 0x104
push eax
call fcn.00409210
add esp, 0x10
lea eax, [ebp - 0x934]
push eax
call edi
push ebx
push str.IsMSISrvFree___Out_ret___d_n
lea eax, [ebp - 0x934]
push 0x104
push eax
call fcn.00409210
add esp, 0x10
lea eax, [ebp - 0x934]
push eax
call edi
test ebx, ebx
je 0x40d4cf
push dword [ebp - 0x97c]
mov edx, dword [ebp - 0x968]
push dword [ebp - 0x960]
mov ecx, dword [ebp - 0x984]
push dword [ebp - 0x978]
push dword [ebp - 0x980]
call fcn.0040bbd0
add esp, 0x10
mov esi, eax
mov eax, dword [ebp - 0x968]
test eax, eax
je 0x40d4df
push eax
call fcn.0040e080
mov eax, dword [ebp - 0x970]
test eax, eax
je 0x40d4ef
push eax
call fcn.0040e080
mov eax, dword [ebp - 0x974]
test eax, eax
je 0x40d4ff
push eax
call fcn.0040e080
mov eax, dword [ebp - 0x978]
test eax, eax
je 0x40d50f
push eax
call fcn.0040e080
mov edx, dword [ebp - 0x938]
movzx esi, si
cmp edx, 8
jb 0x40d54e
mov ecx, dword [ebp - 0x94c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40d544
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40d56e
push edx
push ecx
call fcn.00410b00
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.00410abf
mov esp, ebp
pop ebp
ret 0x10
call fcn.00418a34
int3