Function at 0x490480
Capabilities:
Accept command line arguments
Parse pe header
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x24
mov eax, dword [0x5c7004]
xor eax, esp
mov dword [esp + 0x20], eax
push ebx
push esi
push edi
xor eax, eax
mov byte [esp + 0x18], 0
push 0x800
push eax
push str.wdc.dll
mov esi, edx
mov dword [esp + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x4904d6
push 0xa00
push eax
push str.wdc.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x490750
mov eax, 0x5a4d
cmp word [edi], ax
jne 0x490749
mov eax, dword [edi + 0x3c]
test eax, eax
je 0x490749
cmp eax, 0x7fffffff
jae 0x490749
cmp dword [eax + edi], 0x4550
jne 0x490749
lea edx, [eax + 0x78]
mov eax, dword [edx + edi]
add edx, edi
test eax, eax
je 0x490749
cmp dword [edx + 4], 0
je 0x490749
push 0
add eax, edi
mov ecx, edi
push str.WdcRunTaskAsInteractiveUser
push eax
call fcn.004c0900
mov dword ds:[esp + 0x20], eax
test eax, eax
je 0x490749
lea eax, [esp + 0x28]
push eax
push dword [esi + 4]
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov dword ds:[esp + 0x14], eax
test eax, eax
je 0x490728
push dword [eax]
call sym.ProcessHacker.exe_PhCreateString
mov esi, eax
or ebx, 0xffffffff
test esi, esi
je 0x4906b2
push dword ds:[esi + 4]
call sym.ProcessHacker.exe_PhDoesFileExistsWin32
test al, al
jne 0x4905b1
mov ecx, dword [esi + 4]
call fcn.004bf300
mov ecx, eax
test ecx, ecx
je 0x490662
mov eax, esi
mov esi, ecx
lea ecx, [eax - 8]
mov eax, ebx
lock xadd dword [ecx + 4], eax
dec eax
jne 0x4905b1
call fcn.004c1f60
push 0x5838c0
push dword [esi + 4]
push 0x5838c0
push 3
call sym.ProcessHacker.exe_PhConcatStrings
mov ecx, eax
mov dword [esp + 0x20], eax
add esp, 0x10
mov dword [esp + 0x1c], ecx
mov eax, ebx
lock xadd dword [esi - 4], eax
dec eax
jne 0x4905e9
lea ecx, ds:[esi - 8]
call fcn.004c1f60
mov ecx, dword [esp + 0x1c]
cmp dword [esp + 0x28], 2
jne 0x49069c
mov eax, dword ds:[esp + 0x14]
push dword [eax + 4]
call sym.ProcessHacker.exe_PhCreateString
mov esi, eax
push 0x5838c0
push dword [esi + 4]
push 0x5838c0
push 3
call sym.ProcessHacker.exe_PhConcatStrings
mov dword [esp + 0x1c], eax
lea ecx, [esi - 8]
add esp, 0x10
mov eax, ebx
lock xadd dword [ecx + 4], eax
dec eax
jne 0x490634
call fcn.004c1f60
mov esi, dword [esp + 0xc]
mov eax, dword [esp + 0x10]
push dword [esi + 4]
push 0x5838c4
push dword [eax + 4]
push 3
call sym.ProcessHacker.exe_PhConcatStrings
add esp, 0x10
mov dword [esp + 0x10], eax
push esi
call sym.ProcessHacker.exe_PhDereferenceObject
mov ecx, dword ds:[esp + 0x1c]
jmp 0x4906a0
lea ecx, [esi - 8]
mov eax, ebx
lock xadd dword [ecx + 4], eax
dec eax
jne 0x4906b2
call fcn.004c1f60
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov al, byte [esp + 0x18]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.00534c91
mov esp, ebp
pop ebp
ret
lock inc dword [ecx - 4]
add ecx, 0xfffffff8
mov eax, ebx
lock xadd dword [ecx + 4], eax
dec eax
jne 0x4906b2
call fcn.004c1f60
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov esi, dword [esp + 0x10]
test esi, esi
je 0x490728
cmp dword [esi], 0
je 0x490716
xor cl, cl
call fcn.004902e0
mov dword [esp + 0xc], eax
test eax, eax
je 0x4906dd
mov eax, dword [eax + 4]
jmp 0x4906df
xor eax, eax
mov ecx, dword [esp + 0x20]
push 0
push eax
push dword [esi + 4]
call dword [0x55890c]
call dword [esp + 0x2c]
mov ecx, dword [esp + 0x18]
test eax, eax
mov eax, dword [esp + 0xc]
mov edx, 1
movzx ecx, cl
cmove ecx, edx
mov dword [esp + 0x18], ecx
test eax, eax
je 0x490716
push eax
call sym.ProcessHacker.exe_PhDereferenceObject
lea ecx, ds:[esi - 8]
lock xadd dword [ecx + 4], ebx
dec ebx
jne 0x490728
call fcn.004c1f60
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov al, byte ds:[esp + 0x18]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.00534c91
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword ds:[esp + 0x2c]
xor al, al
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00534c91
mov esp, ebp
pop ebp
ret