Function at 0x51d670
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5af877
mov eax, dword fs:[0]
push eax
sub esp, 0xb8
mov eax, dword [0x639354]
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 ebx, dword [ebp + 8]
mov dword [ebp - 0xc0], 0
test ebx, ebx
je 0x51d783
cmp dword [ebx], 0x3c
jne 0x51d783
test byte [ebx + 4], 0xc
jne 0x51d8ce
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x51d783
cmp word [eax], 0
je 0x51d783
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x51d783
cmp word [eax], 0
je 0x51d783
push eax
lea ecx, [ebp - 0x40]
call fcn.0043f5c0
lea eax, [ebp - 0x40]
mov dword [ebp - 4], 0
push str..exe
push eax
mov dword [ebp - 0xc0], 1
call fcn.00527ee0
add esp, 8
test al, al
je 0x51d750
push str.open
push dword [ebx + 0xc]
call fcn.0056b422
add esp, 8
test eax, eax
je 0x51d747
push str.runas
push dword [ebx + 0xc]
call fcn.0056b422
add esp, 8
test eax, eax
jne 0x51d750
mov byte [ebp - 0xb9], 1
jmp 0x51d757
mov byte [ebp - 0xb9], 0
lea ecx, [ebp - 0x40]
mov dword [ebp - 4], 0xffffffff
call fcn.0042ab30
cmp byte [ebp - 0xb9], 0
mov edx, dword [ebx + 0x10]
je 0x51d7a1
push edx
call fcn.0051ee50
add esp, 4
test eax, eax
jne 0x51d8ce
xor eax, eax
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.0055c3a9
mov esp, ebp
pop ebp
ret
test edx, edx
je 0x51d783
cmp word [edx], 0
je 0x51d783
mov ecx, edx
mov dword [ebp - 0x28], 0
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
lea esi, [ecx + 2]
jmp 0x51d7d0
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x51d7d0
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x28]
call fcn.0042e330
lea eax, [ebp - 0x28]
mov dword [ebp - 4], 1
push eax
lea eax, [ebp - 0x70]
push eax
call fcn.00528000
push eax
lea eax, [ebp - 0x58]
mov byte [ebp - 4], 2
push eax
call fcn.005276d0
push eax
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 3
push eax
call fcn.00528c30
add esp, 0x18
lea ecx, [ebp - 0x58]
call fcn.0042ab30
lea ecx, [ebp - 0x70]
call fcn.0042ab30
mov edx, dword [ebp - 0x14]
mov byte [ebp - 4], 7
cmp edx, 8
jb 0x51d86a
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x51d860
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x51d938
push edx
push ecx
call fcn.0055c524
add esp, 8
xor eax, eax
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
lea eax, [ebp - 0x40]
push eax
mov dword [ebp - 0x14], 7
call fcn.00528150
add esp, 4
test al, al
je 0x51d8b5
lea eax, [ebp - 0x40]
push eax
call fcn.00528110
add esp, 4
test al, al
je 0x51d8b5
lea eax, [ebp - 0x40]
push eax
call fcn.00528170
add esp, 4
test al, al
jne 0x51d8b5
mov esi, 1
jmp 0x51d8b7
xor esi, esi
lea ecx, [ebp - 0x40]
mov dword [ebp - 4], 0xffffffff
call fcn.0042ab30
test esi, esi
je 0x51d783
mov esi, dword [ebx + 0x14]
lea ecx, [ebp - 0x40]
mov edi, dword [ebx + 0x10]
push str.kSafeRunProcess
call fcn.0043f5c0
push esi
push edi
lea eax, [ebp - 0x40]
mov dword [ebp - 4], 8
push eax
lea ecx, [ebp - 0xb8]
call fcn.004786f0
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 0xa
call fcn.0042ab30
push 2
lea ecx, [ebp - 0xc4]
call fcn.00527490
push ebx
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
lea ecx, [ebp - 0xc4]
mov esi, eax
call fcn.00527530
lea ecx, [ebp - 0xb8]
call fcn.00478de0
mov eax, esi
jmp 0x51d785
call fcn.0056af64
int3