Function at 0x40e940
Capabilities:
Accept command line arguments
Acquire debug privileges
Initialize winsock library
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x1f0
mov eax, dword [0x50b0b0]
xor eax, esp
mov dword [esp + 0x1ec], eax
mov eax, dword fs:[0x2c]
mov ecx, dword [0x50d5c4]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x50cd4c]
cmp eax, dword [ecx + 4]
jg 0x40f1fc
push ebx
push esi
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0
push eax
xorps xmm0, xmm0
push 0x28
movlpd qword [esp + 0x3c], xmm0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov esi, dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
push eax
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x40e9fe
lea eax, [esp + 0x34]
push eax
push str.SeDebugPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x40e9f8
mov eax, dword [esp + 0x34]
push 0
push 0
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x40]
push 0x10
mov dword [esp + 0x30], eax
lea eax, [esp + 0x28]
push eax
push 0
push dword [esp + 0x2c]
mov dword [esp + 0x34], 1
mov dword [esp + 0x40], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x40e9fe
push dword [esp + 0x18]
call ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea ecx, [esp + 0x18]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
push 0xc
xor eax, eax
mov dword [esp + 0x30], 0
push str.explorer.exe
lea ecx, [esp + 0x24]
mov dword [esp + 0x38], 7
mov word [esp + 0x24], ax
call fcn.0040b650
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x3c]
push eax
call fcn.004a9b80
mov edx, dword [esp + 0x3c]
add esp, 0xc
cmp edx, 8
jb 0x40ea8a
mov ecx, dword [esp + 0x1c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40ea80
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40f241
push edx
push ecx
call fcn.004bf27b
add esp, 8
mov edx, dword [esp + 0x34]
cmp edx, dword [esp + 0x38]
jne 0x40ec36
mov dword [0x50cd38], 0
test edx, edx
je 0x40ead7
mov ecx, dword [esp + 0x3c]
mov eax, edx
sub ecx, edx
and ecx, 0xfffffffc
cmp ecx, 0x1000
jb 0x40eacd
mov edx, dword [edx - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40f246
push ecx
push edx
call fcn.004bf27b
add esp, 8
push ebp
push edi
push 0x4ea3f4
push 0
call fcn.004c95f1
push 0x190
lea eax, [esp + 0x78]
push 0
push eax
call fcn.004c20c0
add esp, 0x14
lea eax, [esp + 0x6c]
push eax
push 0x202
call sub.WS2_32.dll_WSAStartup
xor eax, eax
mov dword [esp + 0x1c], 0
mov word [esp + 0x24], ax
mov ebx, 0x2710
lea eax, [esp + 0x1c]
mov byte [esp + 0x1b], 0
push eax
mov byte [esp + 0x17], 0
mov byte [esp + 0x19], 0
mov byte [esp + 0x18], 0
mov byte [esp + 0x1a], 0
mov byte [esp + 0x1b], 0
mov byte [esp + 0x1c], 0
mov byte [esp + 0x1d], 0
mov byte [esp + 0x1e], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 7
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov ebp, eax
test ebp, ebp
je 0x40ee75
cmp dword [esp + 0x1c], 2
jl 0x40ee75
mov edx, dword [ebp + 4]
mov ecx, edx
lea esi, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40eb90
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [esp + 0x2c]
call fcn.0040b650
cmp dword [esp + 0x38], 8
lea esi, [esp + 0x24]
mov edi, dword [esp + 0x24]
cmovae esi, edi
cmp dword [esp + 0x34], 6
jne 0x40ecee
mov ecx, str.__stop
mov edx, 6
sub esi, ecx
mov ax, word [esi + ecx]
cmp ax, word [ecx]
jne 0x40ecee
add ecx, 2
sub edx, 1
jne 0x40ebd1
mov esi, 2
cmp dword [esp + 0x1c], esi
jle 0x40ecb6
nop word [eax + eax]
mov eax, dword [ebp + esi*4]
mov ecx, str._timeout
nop dword [eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40ec93
test dx, dx
je 0x40ec32
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40ec93
add eax, 4
add ecx, 4
test dx, dx
jne 0x40ec10
xor eax, eax
jmp 0x40ec98
push dword [edx]
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
push 0x50cd38
push 0xc
push eax
call esi
mov edx, dword [esp + 0x34]
test eax, eax
je 0x40ea98
test edx, edx
je 0x40ead7
mov ecx, dword [esp + 0x3c]
mov eax, edx
sub ecx, edx
and ecx, 0xfffffffc
cmp ecx, 0x1000
jb 0x40eacd
mov edx, dword [edx - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40f246
jmp 0x40eacd
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40ecab
push dword [ebp + esi*4 + 4]
inc esi
call fcn.004c55ea
add esp, 4
mov ebx, eax
inc esi
cmp esi, dword [esp + 0x1c]
jl 0x40ec00
xor esi, esi
test ebx, ebx
js 0x40ee75
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push 1
call fcn.004aa0c0
add esp, 4
test eax, eax
je 0x40ee75
push 0x3e8
call edi
add esi, 0x3e8
cmp esi, ebx
jle 0x40ecc6
jmp 0x40ee75
lea eax, [esp + 0x24]
push str.__force_stop
push eax
call fcn.004016d0
add esp, 8
test al, al
jne 0x40ee60
lea eax, [esp + 0x24]
push str.__remove_shortcuts
push eax
call fcn.004016d0
add esp, 8
test al, al
jne 0x40ee47
lea eax, [esp + 0x24]
push str.__create_shortcuts
push eax
call fcn.004016d0
add esp, 8
test al, al
je 0x40ed42
mov byte [esp + 0x1b], 1
jmp 0x40ee75
lea eax, [esp + 0x24]
push str.__remove_all_users_empty_folders
push eax
call fcn.004016d0
add esp, 8
test al, al
je 0x40ed67
mov al, byte [esp + 0x14]
mov cl, 1
mov byte [esp + 0x13], cl
jmp 0x40ee7b
lea eax, [esp + 0x24]
push str.__remove_active_backup_folder
push eax
call fcn.004016d0
add esp, 8
test al, al
je 0x40ed87
mov byte [esp + 0x15], 1
jmp 0x40ee75
lea eax, [esp + 0x24]
push str.__move_private_beta_data
push eax
call fcn.004016d0
add esp, 8
test al, al
je 0x40edac
mov cl, byte [esp + 0x13]
mov al, 1
mov byte [esp + 0x14], al
jmp 0x40ee7b
lea eax, [esp + 0x24]
push str.__remove_snapshot
push eax
call fcn.004016d0
add esp, 8
test al, al
je 0x40edcc
mov byte [esp + 0x16], 1
jmp 0x40ee75
lea eax, [esp + 0x24]
push str.__remove_task_scheduler
push eax
call fcn.004016d0
add esp, 8
test al, al
je 0x40edec
mov byte [esp + 0x17], 1
jmp 0x40ee75
lea eax, [esp + 0x24]
push str.__auth
push eax
call fcn.004016d0
add esp, 8
test al, al
je 0x40ee09
mov byte [esp + 0x18], 1
jmp 0x40ee75
lea eax, [esp + 0x24]
push str.__clear_icon_cache
push eax
call fcn.004016d0
add esp, 8
test al, al
je 0x40ee26
mov byte [esp + 0x19], 1
jmp 0x40ee75
lea eax, [esp + 0x24]
push str.__move_log
push eax
call fcn.004016d0
add esp, 8
test al, al
je 0x40efdf
mov byte [esp + 0x1a], 1
jmp 0x40ee75
lea eax, [ebp + 8]
push eax
mov eax, dword [esp + 0x20]
add eax, 0xfffffffe
push eax
call fcn.00407bb0
add esp, 8
jmp 0x40efba
push 0
call fcn.004a9d70
add esp, 4
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov al, byte [esp + 0x14]
mov cl, al
cmp byte [esp + 0x1b], 0
lea ebx, [ebp + 8]
je 0x40eed2
mov eax, dword [esp + 0x1c]
add eax, 0xfffffffe
push ebx
push eax
call fcn.00405650
mov dl, byte [esp + 0x1d]
add esp, 8
mov ah, byte [esp + 0x18]
mov cl, byte [esp + 0x13]
mov al, byte [esp + 0x14]
mov byte [esp + 0x15], dl
mov dl, byte [esp + 0x16]
mov byte [esp + 0x16], dl
mov dl, byte [esp + 0x17]
mov byte [esp + 0x17], dl
mov dl, byte [esp + 0x1a]
mov byte [esp + 0x18], ah
mov ah, byte [esp + 0x19]
mov byte [esp + 0x13], cl
mov byte [esp + 0x19], ah
mov byte [esp + 0x1a], dl
test al, al
je 0x40eedf
call fcn.00406d00
mov cl, byte [esp + 0x13]
test cl, cl
je 0x40eee8
call fcn.00407700
cmp byte [esp + 0x15], 0
je 0x40eef4
call fcn.00407460
cmp byte [esp + 0x16], 0
je 0x40ef00
call fcn.00404b20
cmp byte [esp + 0x17], 0
je 0x40ef86
lea eax, [esp + 0x54]
push eax
call fcn.004aa540
add esp, 4
cmp dword [esp + 0x64], 0
je 0x40f01f
lea eax, [esp + 0x54]
push eax
lea eax, [esp + 0x40]
push eax
call fcn.0040df90
add esp, 8
cmp dword [eax + 0x14], 8
jb 0x40ef39
mov eax, dword [eax]
push eax
push str.init_com_failed___s_
call fcn.00406230
add esp, 8
lea ecx, [esp + 0x3c]
call fcn.00403870
mov edx, dword [esp + 0x68]
cmp edx, 0x10
jb 0x40ef86
mov ecx, dword [esp + 0x54]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40ef7c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40f25a
push edx
push ecx
call fcn.004bf27b
add esp, 8
cmp byte [esp + 0x18], 0
je 0x40ef9e
mov eax, dword [esp + 0x1c]
add eax, 0xfffffffe
push ebx
push eax
call fcn.00408160
add esp, 8
cmp byte [esp + 0x19], 0
je 0x40efaa
call fcn.004050f0
cmp byte [esp + 0x1a], 0
je 0x40efb6
call fcn.00406530
test ebp, ebp
je 0x40efc1
push ebp
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [0x50cd38]
test eax, eax
je 0x40efdb
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x50cd38], 0
mov edi, dword [esp + 0x24]
call sub.WS2_32.dll_WSACleanup
mov eax, dword [esp + 0x38]
cmp eax, 8
jb 0x40f1df
lea ecx, [eax*2 + 2]
mov eax, edi
cmp ecx, 0x1000
jb 0x40f1d5
mov edi, dword [edi - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40f24b
jmp 0x40f1d5
lea eax, [esp + 0x3c]
push 0
push eax
call fcn.004aa820
mov esi, eax
add esp, 8
lea eax, [esp + 0x54]
cmp eax, esi
je 0x40f0a7
mov edx, dword [esp + 0x68]
cmp edx, 0x10
jb 0x40f06e
mov ecx, dword [esp + 0x54]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40f064
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40f250
push edx
push ecx
call fcn.004bf27b
add esp, 8
mov dword [esp + 0x64], 0
mov dword [esp + 0x68], 0xf
mov byte [esp + 0x54], 0
movups xmm0, xmmword [esi]
movups xmmword [esp + 0x54], xmm0
movq xmm0, qword [esi + 0x10]
movq qword [esp + 0x64], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0xf
mov byte [esi], 0
mov edx, dword [esp + 0x50]
cmp edx, 0x10
jb 0x40f0dd
mov ecx, dword [esp + 0x3c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40f0d3
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40f250
push edx
push ecx
call fcn.004bf27b
add esp, 8
mov esi, dword [esp + 0x64]
test esi, esi
je 0x40f19c
cmp dword [esp + 0x68], 0x10
lea edi, [esp + 0x54]
lea ecx, [esp + 0x3c]
mov dword [esp + 0x4c], 0
cmovae edi, dword [esp + 0x54]
add edi, esi
mov dword [esp + 0x50], 7
cmp dword [esp + 0x68], 0x10
lea esi, [esp + 0x54]
cmovae esi, dword [esp + 0x54]
xor eax, eax
mov word [esp + 0x3c], ax
mov eax, edi
sub eax, esi
push eax
call fcn.0040d540
push dword [esp + 0x20]
lea ecx, [esp + 0x40]
push edi
push esi
call fcn.00401d90
cmp dword [esp + 0x50], 8
lea eax, [esp + 0x3c]
cmovae eax, dword [esp + 0x3c]
push eax
push str.clean_wakeup_schedule_failed___s_
call fcn.00406230
mov edx, dword [esp + 0x58]
add esp, 8
cmp edx, 8
jb 0x40ef50
mov ecx, dword [esp + 0x3c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40f18d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40f255
push edx
push ecx
call fcn.004bf27b
add esp, 8
jmp 0x40ef50
mov edx, dword [esp + 0x68]
cmp edx, 0x10
jb 0x40ef86
mov ecx, dword [esp + 0x54]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40ef7c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40f25a
jmp 0x40ef7c
push ecx
push edi
call fcn.004bf27b
add esp, 8
mov ecx, dword [esp + 0x1fc]
xor eax, eax
pop edi
pop ebp
pop esi
pop ebx
xor ecx, esp
call fcn.004bf6e8
add esp, 0x1f0
ret 0x10
push 0x50cd4c
call fcn.004bf612
add esp, 4
cmp dword [0x50cd4c], 0xffffffff
jne 0x40e974
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
push 0x4e96b0
mov byte [0x50cd48], 1
call fcn.004bf4ca
push 0x50cd4c
call fcn.004bf5c8
add esp, 8
jmp 0x40e974
call fcn.004c4b9a
call fcn.004c4b9a
call fcn.004c4b9a
call fcn.004c4b9a
call fcn.004c4b9a
call fcn.004c4b9a
int3