Function at 0x402077
Capabilities:
Accept command line arguments
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3dc
mov eax, dword [0x4a919c]
xor eax, esp
mov dword [esp + 0x3d8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
push ebx
xor ebx, ebx
mov dword [esp + 0xa0], eax
mov al, bl
mov dword [esp + 0x9c], ebx
push esi
push edi
mov dword [esp + 0x18], eax
mov byte [esp + 0x2c], al
mov dword [esp + 0x20], eax
mov byte [esp + 0x34], al
lea eax, [esp + 0x9c]
push eax
push ecx
mov dword [esp + 0x40], ecx
mov byte [esp + 0x30], bl
mov byte [esp + 0x44], bl
mov dword [esp + 0x38], 0x270f
mov byte [esp + 0x19], bl
mov byte [esp + 0x1a], bl
mov byte [esp + 0xa8], bl
mov byte [esp + 0x24], bl
mov byte [esp + 0x1b], bl
mov byte [esp + 0x18], bl
mov dword [esp + 0x180], ebx
mov dword [esp + 0x190], ebx
mov dword [esp + 0x194], 7
mov dword [esp + 0xa4], ebx
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov edi, eax
mov esi, ebx
mov dword [esp + 0x14], edi
cmp dword [esp + 0x9c], ebx
jle 0x402359
mov edx, dword [edi + esi*4]
mov ecx, str._remotedebug
mov eax, edx
mov di, word [eax]
cmp di, word [ecx]
jne 0x402162
test di, di
je 0x40215b
mov di, word [eax + 2]
cmp di, word [ecx + 2]
jne 0x402162
add eax, 4
add ecx, 4
test di, di
jne 0x402139
xor ecx, ecx
mov eax, ebx
inc ecx
jmp 0x402169
sbb eax, eax
xor ecx, ecx
inc ecx
or eax, ecx
test eax, eax
jne 0x402176
mov byte [esp + 0x28], cl
jmp 0x4022af
mov ecx, str._wait
mov eax, edx
mov di, word [eax]
cmp di, word [ecx]
jne 0x4021a6
test di, di
je 0x40219f
mov di, word [eax + 2]
cmp di, word [ecx + 2]
jne 0x4021a6
add eax, 4
add ecx, 4
test di, di
jne 0x40217d
xor ecx, ecx
mov eax, ebx
inc ecx
jmp 0x4021ad
sbb eax, eax
xor ecx, ecx
inc ecx
or eax, ecx
test eax, eax
jne 0x4021ba
mov byte [esp + 0x3c], cl
jmp 0x4022af
mov ecx, str._remoteport
mov eax, edx
mov di, word [eax]
cmp di, word [ecx]
jne 0x4021e7
test di, di
je 0x4021e3
mov di, word [eax + 2]
cmp di, word [ecx + 2]
jne 0x4021e7
add eax, 4
add ecx, 4
test di, di
jne 0x4021c1
mov eax, ebx
jmp 0x4021ec
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40222f
mov edi, dword [esp + 0x14]
lea eax, [esi + 1]
cmp dword [esp + 0x9c], eax
jle 0x402222
push dword [edi + esi*4 + 4]
call fcn.004574bf
pop ecx
mov ecx, eax
lea eax, [ecx - 1]
cmp eax, 0xfffe
ja 0x402222
movzx eax, cx
mov dword [esp + 0x30], eax
jmp 0x40234b
mov dword [esp + 0x30], 0x270f
jmp 0x40234b
mov ecx, str._permachineupdate
mov eax, edx
mov di, word [eax]
cmp di, word [ecx]
jne 0x40225f
test di, di
je 0x402258
mov di, word [eax + 2]
cmp di, word [ecx + 2]
jne 0x40225f
add eax, 4
add ecx, 4
test di, di
jne 0x402236
xor ecx, ecx
mov eax, ebx
inc ecx
jmp 0x402266
sbb eax, eax
xor ecx, ecx
inc ecx
or eax, ecx
test eax, eax
jne 0x402270
mov byte [esp + 0x13], cl
jmp 0x4022af
mov ecx, str._configure_business
mov eax, edx
mov di, word [eax]
cmp di, word [ecx]
jne 0x4022a0
test di, di
je 0x402299
mov di, word [eax + 2]
cmp di, word [ecx + 2]
jne 0x4022a0
add eax, 4
add ecx, 4
test di, di
jne 0x402277
xor ecx, ecx
mov eax, ebx
inc ecx
jmp 0x4022a7
sbb eax, eax
xor ecx, ecx
inc ecx
or eax, ecx
test eax, eax
jne 0x4022b8
mov byte [esp + 0x11], cl
mov edi, dword [esp + 0x14]
jmp 0x40234b
push ecx
push str._url:
push edx
call fcn.004087bc
mov edi, dword [esp + 0x14]
mov ecx, dword [edi + esi*4]
test al, al
je 0x402304
push 0x499f1c
push ecx
lea eax, [esp + 0xec]
push eax
call fcn.004084e6
push eax
lea ecx, [esp + 0x17c]
call fcn.004036d3
lea ecx, [esp + 0xe4]
call fcn.0040443d
xor eax, eax
inc eax
mov byte [esp + 0x10], al
jmp 0x40234b
mov eax, 0x499f20
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x40232f
test dx, dx
je 0x40232b
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x40232f
add ecx, 4
add eax, 4
test dx, dx
jne 0x402309
mov eax, ebx
jmp 0x402334
sbb eax, eax
or eax, 1
mov ecx, dword [esp + 0x18]
test eax, eax
push 1
movzx ecx, cl
pop eax
cmove ecx, eax
mov dword [esp + 0x18], ecx
mov byte [esp + 0x2c], cl
inc esi
cmp esi, dword [esp + 0x9c]
jl 0x40212f
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
test eax, eax
jns 0x402369
xor eax, eax
mov word [ebx], ax
push ebx
push 2
push ebx
push 2
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push ebx
call dword [sym.imp.ole32.dll_CoInitializeSecurity]
test eax, eax
jns 0x402384
xor eax, eax
mov word [ebx], ax
xorps xmm0, xmm0
push 0x44
movlpd qword [esp + 0xb0], xmm0
call fcn.00451221
pop ecx
push 0x44
mov esi, eax
push ebx
push esi
call fcn.004546e0
add esp, 0xc
mov ecx, esi
call fcn.0040f763
push eax
lea ecx, [esp + 0xb0]
call fcn.00403a7f
push 7
pop eax
mov dword [esp + 0x174], eax
mov ecx, ebx
mov dword [esp + 0x1ec], eax
mov dword [esp + 0xc8], eax
mov eax, ebx
mov dword [esp + 0x160], ebx
mov dword [esp + 0x170], ebx
mov dword [esp + 0x1d8], ebx
mov dword [esp + 0x1e8], ebx
mov dword [esp + 0xb4], ebx
mov dword [esp + 0xc4], ecx
mov dword [esp + 0x18], eax
cmp byte [esp + 0x10], al
je 0x4024d7
push 0x44
lea eax, [esp + 0x194]
push ebx
push eax
call fcn.004546e0
add esp, 0xc
lea eax, [esp + 0x178]
lea ecx, [esp + 0x190]
push eax
call fcn.00417e8f
lea ecx, [esp + 0x190]
call fcn.00418594
mov dword [esp + 0x20], eax
lea ecx, [esp + 0x190]
mov byte [esp + 0x34], al
lea eax, [esp + 0xac]
push eax
lea eax, [esp + 0xe8]
push eax
call fcn.00418770
push eax
lea ecx, [esp + 0xb8]
call fcn.004036fd
lea ecx, [esp + 0xe4]
call fcn.0040443d
cmp dword [esp + 0xc4], ebx
jne 0x402492
mov eax, 0xc02500b6
mov dword [esp + 0x18], eax
jmp 0x4024c4
cmp dword [esp + 0xc8], 8
lea eax, [esp + 0xb4]
push dword [esp + 0xc4]
cmovae eax, dword [esp + 0xb8]
lea ecx, [esp + 0x164]
push eax
call fcn.00403862
xor eax, eax
inc eax
mov byte [esp + 0x1c], al
lea ecx, [esp + 0x190]
call fcn.0041805c
mov ecx, dword [esp + 0xc4]
test ecx, ecx
jne 0x40255f
test edi, edi
je 0x40255f
push str._client
lea ecx, [esp + 0xe8]
call fcn.00403736
lea eax, [esp + 0x160]
push eax
lea eax, [esp + 0xe8]
push eax
push dword [esp + 0xa4]
push edi
call fcn.0041c5b0
lea ecx, [esp + 0xe4]
mov byte [esp + 0x1c], al
call fcn.0040443d
push str._configure_business:
lea ecx, [esp + 0xe8]
call fcn.00403736
lea eax, [esp + 0x1d8]
push eax
lea eax, [esp + 0xe8]
push eax
push dword [esp + 0xa4]
push edi
call fcn.0041c5b0
lea ecx, [esp + 0xe4]
mov byte [esp + 0x12], al
call fcn.0040443d
lea ecx, [esp + 0xfc]
call fcn.0041c9e6
cmp byte [esp + 0x11], bl
jne 0x40257d
cmp byte [esp + 0x12], bl
jne 0x40257d
mov byte [esp + 0x24], bl
jmp 0x402584
xor eax, eax
inc eax
mov byte [esp + 0x24], al
call fcn.0041ca35
lea ecx, [esp + 0xa0]
push ecx
lea ecx, [esp + 0xb8]
push ecx
lea ecx, [esp + 0x168]
push ecx
push dword [esp + 0x38]
push dword [esp + 0x2c]
push dword [esp + 0x38]
push eax
push ecx
push ecx
mov ecx, esp
mov dword [ecx], ebx
mov dword [ecx + 4], ebx
mov eax, dword [esp + 0xd4]
test eax, eax
je 0x4025c6
lock inc dword [eax + 4]
mov eax, dword [esp + 0xd0]
mov dword [ecx], eax
mov eax, dword [esp + 0xd4]
mov dword [ecx + 4], eax
call fcn.0042097f
push str.Personal
lea ecx, [esp + 0xb8]
call fcn.004040a5
xor ecx, ecx
inc ecx
xor al, cl
mov byte [esp + 0x24], al
je 0x402707
lea ecx, [esp + 0x1f0]
call fcn.0040f6ef
mov edi, dword [esp + 0xac]
mov eax, dword [edi]
mov esi, dword [eax + 0xc]
lea eax, [esp + 0x1f0]
push eax
lea eax, [esp + 0xb8]
mov ecx, esi
push eax
call dword [0x481514]
mov ecx, edi
call esi
test al, al
je 0x40263f
mov al, byte [esp + 0x251]
jmp 0x402692
cmp byte [esp + 0xa0], bl
je 0x40268e
lea eax, [esp + 0xcc]
mov dword [esp + 0xcc], ebx
push eax
mov dword [esp + 0xe0], ebx
mov dword [esp + 0xe4], 7
call fcn.00425042
test al, al
je 0x402682
call fcn.00422c1d
dec eax
neg eax
sbb al, al
inc al
mov dword [esp + 0x20], eax
lea ecx, [esp + 0xcc]
call fcn.0040443d
mov eax, dword [esp + 0x20]
test al, al
jne 0x4026d2
push str._OnPrem
lea ecx, [esp + 0xe8]
call fcn.00403736
mov esi, dword [esp + 0x14]
xor eax, eax
inc eax
mov dword [esp + 0xa4], eax
lea eax, [esp + 0xe4]
push eax
push dword [esp + 0xa0]
push esi
call 0x41c65c
test al, al
jne 0x4026d6
mov al, bl
jmp 0x4026d9
mov esi, dword [esp + 0x14]
xor eax, eax
inc eax
mov byte [esp + 0x34], al
mov dword [esp + 0x20], eax
xor eax, eax
inc eax
test byte [esp + 0xa4], al
je 0x4026f9
lea ecx, [esp + 0xe4]
call fcn.0040443d
lea ecx, [esp + 0x1f0]
call fcn.00402d97
jmp 0x40270b
mov esi, dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edi, ebx
mov eax, 0xc02500e3
cmp byte [esp + 0x13], bl
je 0x4027ac
lea ecx, [esp + 0x40]
call 0x43a72e
mov esi, 0x49a3d0
mov dword [esp + 0x8c], ebx
push esi
lea ecx, [esp + 0x78]
call fcn.00403839
push esi
lea ecx, [esp + 0x48]
call fcn.00403839
push esi
lea ecx, [esp + 0x60]
call fcn.00403839
push 0x30
lea eax, [esp + 0x194]
mov dword [esp + 0x44], reloc.OLEAUT32.dll_SysReAllocString
push ebx
push eax
call fcn.004546e0
add esp, 0xc
lea eax, [esp + 0x40]
lea ecx, [esp + 0x190]
push eax
call fcn.0043bd9d
lea ecx, [esp + 0x190]
call fcn.0043c990
lea ecx, [esp + 0x190]
call fcn.0043beb8
lea ecx, [esp + 0x40]
call 0x402e67
mov esi, dword [esp + 0x18]
jmp 0x402cb1
mov esi, dword [esp + 0x18]
test esi, esi
js 0x402cb6
mov ecx, dword [esp + 0x38]
call fcn.004032ef
mov esi, eax
mov dword [esp + 0x18], esi
test esi, esi
js 0x402cb1
push 7
pop eax
push str.FileSyncClient.dll
lea ecx, [esp + 0xe8]
mov dword [esp + 0x14c], ebx
mov dword [esp + 0x15c], ebx
mov dword [esp + 0x160], eax
mov dword [esp + 0x134], ebx
mov dword [esp + 0x144], ebx
mov dword [esp + 0x148], eax
mov dword [esp + 0x11c], ebx
mov dword [esp + 0x12c], ebx
mov dword [esp + 0x130], eax
mov dword [esp + 0x104], ebx
mov dword [esp + 0x114], ebx
mov dword [esp + 0x118], eax
call fcn.00403736
lea eax, [esp + 0x100]
push eax
call fcn.00420807
test eax, eax
jns 0x402883
push str.ucrtbase.dll
lea ecx, [esp + 0x14c]
call fcn.00403839
lea eax, [esp + 0xe4]
push eax
lea ecx, [esp + 0x134]
call fcn.004036d3
push str.LoggingPlatform.dll
lea ecx, [esp + 0x11c]
call fcn.00403839
jmp 0x4029ba
cmp dword [esp + 0x114], 8
lea eax, [esp + 0x100]
cmovae eax, dword [esp + 0x100]
push eax
call dword [sym.imp.KERNEL32.dll_SetDllDirectoryW]
mov edi, 0x49a3cc
lea eax, [esp + 0x100]
push edi
push eax
lea eax, [esp + 0x198]
push eax
call fcn.004039c9
push str.ucrtbase.dll
mov ecx, eax
call fcn.004038b3
push eax
lea ecx, [esp + 0xd0]
call fcn.00404175
lea eax, [esp + 0xcc]
push eax
lea ecx, [esp + 0x14c]
call fcn.004036fd
lea ecx, [esp + 0xcc]
call fcn.0040443d
lea ecx, [esp + 0x190]
call fcn.0040443d
push edi
lea eax, [esp + 0x104]
push eax
lea eax, [esp + 0x198]
push eax
call fcn.004039c9
lea ecx, [esp + 0xe4]
push ecx
mov ecx, eax
call fcn.004038dc
push eax
lea ecx, [esp + 0xd0]
call fcn.00404175
lea eax, [esp + 0xcc]
push eax
lea ecx, [esp + 0x134]
call fcn.004036fd
lea ecx, [esp + 0xcc]
call fcn.0040443d
lea ecx, [esp + 0x190]
call fcn.0040443d
push edi
lea eax, [esp + 0x104]
push eax
lea eax, [esp + 0x198]
push eax
call fcn.004039c9
push str.LoggingPlatform.dll
mov ecx, eax
call fcn.004038b3
push eax
lea ecx, [esp + 0xd0]
call fcn.00404175
lea eax, [esp + 0xcc]
push eax
lea ecx, [esp + 0x11c]
call fcn.004036fd
lea ecx, [esp + 0xcc]
call fcn.0040443d
lea ecx, [esp + 0x190]
call fcn.0040443d
cmp dword [esp + 0x15c], 8
lea eax, [esp + 0x148]
cmovae eax, dword [esp + 0x148]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
cmp dword [esp + 0x12c], 8
lea eax, [esp + 0x118]
cmovae eax, dword [esp + 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
test edi, edi
je 0x402b98
call 0x4242de
test al, al
jne 0x402b98
push str.InitLogging
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esp + 0x2c], eax
test eax, eax
je 0x402b98
push dword [esp + 0x24]
mov esi, ebx
call fcn.00424034
test al, al
je 0x402ada
cmp byte [esp + 0x20], bl
je 0x402ab9
lea eax, [esp + 0xcc]
mov dword [esp + 0xcc], ebx
push eax
lea eax, [esp + 0xb8]
mov dword [esp + 0xe0], ebx
push eax
mov dword [esp + 0xe8], 7
call fcn.00422fb9
test eax, eax
js 0x402aab
cmp dword [esp + 0xdc], ebx
je 0x402aab
lea eax, [esp + 0xb4]
push eax
call fcn.0041ff0e
test al, al
je 0x402aab
cmp byte [esp + 0xa0], bl
je 0x402a98
push 3
pop esi
jmp 0x402aab
call fcn.00429005
xor ecx, ecx
test al, al
setne cl
inc ecx
mov dword [esp + 0x1c], ecx
mov esi, ecx
lea ecx, [esp + 0xcc]
call fcn.0040443d
jmp 0x402ada
cmp byte [esp + 0xa0], bl
je 0x402ac7
push 3
pop esi
jmp 0x402ada
call fcn.00429005
xor ecx, ecx
test al, al
setne cl
inc ecx
mov dword [esp + 0x1c], ecx
mov esi, ecx
push str.OfficePrivacySetting
lea ecx, [esp + 0xd0]
mov dword [esp + 0xa8], 3
call fcn.00403736
lea eax, [esp + 0xa4]
push eax
push ebx
lea eax, [esp + 0xd4]
push eax
lea eax, [esp + 0xc0]
push eax
push str.SoftwareMicrosoftOneDriveAccounts_
lea eax, [esp + 0x1a4]
push eax
call fcn.00403a25
push eax
push SysReAllocString
call fcn.004220bd
lea ecx, [esp + 0x190]
call fcn.0040443d
lea ecx, [esp + 0xcc]
call fcn.0040443d
cmp dword [esp + 0xc8], 8
lea eax, [esp + 0xb4]
cmovae eax, dword [esp + 0xb4]
xor ecx, ecx
inc ecx
push ecx
push dword [esp + 0xa8]
push eax
push esi
mov esi, dword [esp + 0x3c]
push ecx
push ecx
push dword [esp + 0x54]
mov ecx, esi
push dword [esp + 0x4c]
push dword [esp + 0x48]
push 0x1e
push 0x64
push 0x65
push str.SyncEngine
push str.OneDrive_Trace_Session
call dword [0x481514]
call esi
mov esi, dword [esp + 0x18]
cmp dword [esp + 0x144], 8
lea eax, [esp + 0x130]
cmovae eax, dword [esp + 0x130]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x402c3a
call fcn.00403148
test al, al
jne 0x402bec
call fcn.00403280
test al, al
jne 0x402bec
call fcn.004031c2
mov edx, dword [esp + 0x38]
xor eax, eax
lea ecx, [eax + 1]
call fcn.00402eb0
test eax, eax
js 0x402bec
mov esi, 0xc02500e4
jmp 0x402c4b
push str.RunClient
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esp + 0x28], eax
test eax, eax
je 0x402c4b
push dword [esp + 0xa0]
cmp dword [esp + 0xcc], 8
lea ecx, [esp + 0xb8]
push dword [esp + 0x38]
cmovae ecx, dword [esp + 0xbc]
push ecx
push dword [esp + 0xb4]
mov ecx, eax
call dword [0x481514]
call dword [esp + 0x38]
mov esi, eax
jmp 0x402c4b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7e
mov eax, 0xc02500e3
cmove esi, eax
test edi, edi
je 0x402c75
push str.UninitLogging
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esp + 0xa8], eax
test eax, eax
je 0x402c75
mov ecx, eax
call dword [0x481514]
call dword [esp + 0xa8]
lea ecx, [esp + 0xe4]
call fcn.0040443d
lea ecx, [esp + 0x100]
call fcn.0040443d
lea ecx, [esp + 0x118]
call fcn.0040443d
lea ecx, [esp + 0x130]
call fcn.0040443d
lea ecx, [esp + 0x148]
call fcn.0040443d
mov eax, 0xc02500e3
cmp esi, 0xbc3
jne 0x402cfa
push str._background
lea ecx, [esp + 0xe8]
call fcn.00403736
lea eax, [esp + 0xa8]
push eax
lea eax, [esp + 0xe8]
push eax
lea eax, [esp + 0xbc]
push eax
call fcn.00429034
lea ecx, [esp + 0xe4]
call fcn.0040443d
jmp 0x402d17
cmp esi, eax
jne 0x402d17
call fcn.00403148
test al, al
jne 0x402d17
call fcn.004031c2
mov edx, dword [esp + 0x38]
xor cl, cl
call fcn.00402eb0
call dword [sym.imp.ole32.dll_CoUninitialize]
test ebx, ebx
je 0x402d28
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test edi, edi
je 0x402d33
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea ecx, [esp + 0xb4]
mov dword [esp + 0xfc], vtable.ScriptedDeployment.0
call fcn.0040443d
lea ecx, [esp + 0x1d8]
call fcn.0040443d
lea ecx, [esp + 0x160]
call fcn.0040443d
mov ecx, dword [esp + 0xb0]
test ecx, ecx
je 0x402d72
call fcn.004041d1
lea ecx, [esp + 0x178]
call fcn.0040443d
mov ecx, dword [esp + 0x3e4]
mov eax, esi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00450f85
mov esp, ebp
pop ebp
ret 0x10