Function at 0x404778
Capabilities:
Acquire debug privileges
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdd8
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x224], eax
mov dword [ebp - 0x228], eax
mov dword [ebp - 0x220], eax
mov dword [ebp - 0x218], eax
lea ebx, [ebp - 0x21c]
xor eax, eax
push ebp
push 0x404af4
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [0x4ab0a8], 0
jne 0x4047d5
push 0x404b04
push 0x404b38
call sub.kernel32.dll_GetModuleHandleW
push eax
call fcn.004016e0
mov dword [0x4ab0a8], eax
cmp dword [0x4ab0ac], 0
jne 0x4047f8
push 0x404b4c
push 0x404b78
call sub.kernel32.dll_LoadLibraryW
push eax
call fcn.004016e0
mov dword [0x4ab0ac], eax
cmp dword [0x4ab0b8], 0
jne 0x40481b
push 0x404b8c
push 0x404bc4
call sub.kernel32.dll_GetModuleHandleW
push eax
call fcn.004016e0
mov dword [0x4ab0b8], eax
cmp dword [0x4ab0bc], 0
jne 0x40483e
push 0x404be0
push 0x404b78
call sub.kernel32.dll_GetModuleHandleW
push eax
call fcn.004016e0
mov dword [0x4ab0bc], eax
cmp dword [0x4ab0a4], 0
jne 0x404861
push 0x404c14
push 0x404b78
call sub.kernel32.dll_GetModuleHandleW
push eax
call fcn.004016e0
mov dword [0x4ab0a4], eax
cmp dword [0x4ab0b0], 0
jne 0x404884
push 0x404c40
push 0x404c60
call sub.kernel32.dll_GetModuleHandleW
push eax
call fcn.004016e0
mov dword [0x4ab0b0], eax
cmp dword [0x4ab0b4], 0
jne 0x4048a7
push 0x404c78
push 0x404bc4
call sub.kernel32.dll_GetModuleHandleW
push eax
call fcn.004016e0
mov dword [0x4ab0b4], eax
xor eax, eax
mov dword [ebx], eax
push ebx
push 0
push 0
push 5
call dword [0x4ab0a8]
xor esi, esi
cmp dword [ebx], 0
jne 0x4048f9
mov dword [ebx], 0x10000
mov eax, dword [ebx]
add eax, eax
mov dword [ebx], eax
push esi
call sub.kernel32.dll_LocalFree
mov eax, dword [ebx]
push eax
push 0x40
call sub.kernel32.dll_LocalAlloc
mov esi, eax
push 0
mov eax, dword [ebx]
push eax
push esi
push 5
call dword [0x4ab0a8]
test eax, eax
je 0x404919
cmp dword [ebx], 0x400000
jne 0x4048c5
jmp 0x404919
mov eax, dword [ebx]
add eax, eax
mov dword [ebx], eax
mov eax, dword [ebx]
push eax
push 0x40
call sub.kernel32.dll_LocalAlloc
mov esi, eax
push 0
mov eax, dword [ebx]
push eax
push esi
push 5
call dword [0x4ab0a8]
test eax, eax
jne 0x404ac5
mov ebx, esi
mov eax, 0x404ca4
mov dl, 1
call fcn.00403e90
mov eax, dword [ebp + 8]
xor edx, edx
mov dword [eax - 0x20], edx
mov eax, dword [ebp + 8]
xor edx, edx
mov dword [eax - 0xc], edx
cmp dword [ebx + 0x3c], 0
je 0x404a9b
lea eax, [ebp - 0x218]
mov edx, dword [ebx + 0x3c]
call fcn.004012e0
mov eax, dword [ebx + 0x44]
push eax
push 0
push 0x410
call sub.kernel32.dll_OpenProcess
mov dword [ebp - 0x214], eax
cmp dword [ebp - 0x214], 0
je 0x404a7b
push ebp
lea eax, [ebp - 0x220]
call fcn.004045dc
pop ecx
mov edx, dword [ebp - 0x220]
lea eax, [ebp - 0x218]
call fcn.004012c0
cmp dword [ebp - 0x218], 0
je 0x404a42
mov edx, dword [ebp - 0x218]
mov eax, 0x404cd4
call fcn.00401f1c
test al, al
je 0x404a17
push 0x104
lea eax, [ebp - 0x20a]
push eax
call sub.kernel32.dll_GetSystemDirectoryW
lea eax, [ebp - 0x224]
push eax
mov ecx, 0x7fffffff
mov edx, 0x15
mov eax, dword [ebp - 0x218]
call fcn.00401350
mov eax, dword [ebp - 0x224]
push eax
lea eax, [ebp - 0x228]
lea edx, [ebp - 0x20a]
mov ecx, 0x105
call fcn.004012f0
mov edx, dword [ebp - 0x228]
lea eax, [ebp - 0x218]
pop ecx
call fcn.00401338
jmp 0x404a50
mov edx, dword [ebp - 0x218]
mov eax, 0x404d0c
call fcn.00401f14
test al, al
je 0x404a50
lea eax, [ebp - 0x218]
mov ecx, 4
mov edx, 1
call fcn.00401358
jmp 0x404a50
lea eax, [ebp - 0x218]
mov edx, dword [ebx + 0x3c]
call fcn.004012e0
cmp dword [0x4ab0a4], 0
je 0x404a6f
push 0x28
mov eax, dword [ebp + 8]
add eax, 0xffffffd4
push eax
mov eax, dword [ebp - 0x214]
push eax
call dword [0x4ab0a4]
mov eax, dword [ebp - 0x214]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebx + 0x4c]
push eax
mov eax, dword [ebx + 4]
push eax
mov ecx, dword [ebx + 0x50]
mov edx, dword [ebx + 0x44]
mov eax, dword [ebp - 0x218]
call fcn.004040bc
pop ecx
jmp 0x404ab8
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebx + 0x4c]
push eax
mov eax, dword [ebx + 4]
push eax
mov ecx, dword [ebx + 0x50]
mov edx, dword [ebx + 0x44]
mov eax, 0x404d24
call fcn.004040bc
pop ecx
mov edi, dword [ebx]
test edi, edi
je 0x404ac5
add ebx, edi
jmp 0x40492f
push esi
call sub.kernel32.dll_LocalFree
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x404afb
lea eax, [ebp - 0x228]
mov edx, 3
call fcn.004012b0
lea eax, [ebp - 0x218]
call fcn.004012a8
ret