Function at 0x427810
Capabilities:
Check for peb beingdebugged flag
Check if file exists
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x4d12f3
mov eax, dword fs:[0]
push eax
sub esp, 0x25c
mov eax, dword [0x4ff0f4]
xor eax, esp
mov dword [esp + 0x258], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4ff0f4]
xor eax, esp
push eax
lea eax, [esp + 0x270]
mov dword fs:[0], eax
xor esi, esi
mov dword [esp + 0x278], esi
mov eax, dword [esp + 0x280]
mov ebp, dword [esp + 0x284]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], esi
xor ecx, ecx
mov eax, ebp
mov dword [esp + 0x44], 7
mov dword [esp + 0x40], esi
mov word [esp + 0x30], cx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x427882
sub eax, edx
sar eax, 1
push eax
push ebp
lea ecx, [esp + 0x34]
call fcn.00408fa0
mov ebx, 1
mov dword [esp + 0x278], ebx
push 0x4eada8
xor eax, eax
lea edx, [esp + 0x30]
call fcn.0042e5b0
mov edi, ebx
lea ebx, [esp + 0x2c]
mov esi, eax
call fcn.0042e690
cmp eax, 0xffffffff
je 0x42792c
mov ecx, eax
lea eax, [esp + 0x48]
push eax
sub ecx, esi
mov eax, ebx
dec ecx
lea edx, [esi + 1]
push eax
call fcn.0042d270
mov byte [esp + 0x278], 2
push 0xffffffffffffffff
push 0
push eax
mov ecx, ebx
call fcn.00407a40
mov byte [esp + 0x278], 1
mov edi, 8
cmp dword [esp + 0x60], edi
jb 0x427913
mov ecx, dword [esp + 0x4c]
push ecx
call fcn.004a9c11
add esp, 4
xor edx, edx
mov dword [esp + 0x60], 7
mov dword [esp + 0x5c], 0
mov word [esp + 0x4c], dx
jmp 0x427931
mov edi, 8
xor eax, eax
mov word [esp + 0x64], ax
mov eax, dword [esp + 0x30]
cmp dword [esp + 0x44], edi
jae 0x427946
lea eax, [esp + 0x30]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
push 0x104
lea ecx, [esp + 0x68]
push ecx
push eax
call ebx
test eax, eax
jne 0x427b3a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x427b22
xor ebp, ebp
push 0xffffffffffffffff
push ebp
lea eax, [esp + 0x34]
xor edx, edx
push eax
lea ecx, [esp + 0x54]
mov dword [esp + 0x6c], 7
mov dword [esp + 0x68], ebp
mov word [esp + 0x58], dx
call fcn.00407a40
mov byte [esp + 0x278], 3
mov dword [esp + 0x1c], 0x4eada4
mov dword [esp + 0x20], 0x4eadac
mov dword [esp + 0x24], str..dll
mov dword [esp + 0x28], str..com
jmp 0x4279c5
mov edi, 8
mov eax, dword [esp + 0x30]
cmp dword [esp + 0x44], edi
jae 0x4279d3
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x68]
push 0x104
push ecx
call fcn.004aa9f8
mov esi, dword [esp + ebp*4 + 0x28]
push esi
lea edx, [esp + 0x74]
push 0x104
push edx
call fcn.004abdd0
add esp, 0x18
push 0x104
lea eax, [esp + 0x68]
push eax
mov ecx, eax
push ecx
call ebx
test eax, eax
jne 0x427aee
push 0x104
lea edx, [esp + 0x68]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push 0x4eace8
lea eax, [esp + 0x68]
push 0x104
push eax
call fcn.004abdd0
mov eax, dword [esp + 0x3c]
add esp, 0xc
cmp dword [esp + 0x44], edi
jae 0x427a46
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x68]
push 0x104
push ecx
call fcn.004abdd0
push esi
lea edx, [esp + 0x74]
push 0x104
push edx
call fcn.004abdd0
add esp, 0x18
lea edi, [esp + 0x64]
call fcn.004275b0
test al, al
jne 0x427ae9
push 0x104
mov eax, edi
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push 0x4eace8
mov ecx, edi
push 0x104
push ecx
call fcn.004abdd0
mov eax, dword [esp + 0x3c]
add esp, 0xc
cmp dword [esp + 0x44], 8
jae 0x427aa8
lea eax, [esp + 0x30]
push eax
lea edx, [esp + 0x68]
push 0x104
push edx
call fcn.004abdd0
push esi
lea eax, [esp + 0x74]
push 0x104
push eax
call fcn.004abdd0
add esp, 0x18
lea edi, [esp + 0x64]
call fcn.004275b0
test al, al
jne 0x427ae9
xor ecx, ecx
inc ebp
cmp ebp, 3
mov word [esp + 0x64], cx
jle 0x4279c0
mov edi, 8
mov byte [esp + 0x278], 1
cmp dword [esp + 0x60], edi
jb 0x427b09
mov edx, dword [esp + 0x4c]
push edx
call fcn.004a9c11
add esp, 4
xor eax, eax
mov dword [esp + 0x60], 7
mov dword [esp + 0x5c], 0
mov word [esp + 0x4c], ax
jmp 0x427b3a
push 0x104
push ebp
lea ecx, [esp + 0x6c]
push 0x104
push ecx
call fcn.004abcb3
add esp, 0x10
mov esi, dword [esp + 0x14]
xor ebx, ebx
mov ebp, 7
xor edx, edx
mov dword [esi + 0x18], ebp
mov dword [esi + 0x14], ebx
lea eax, [esp + 0x64]
mov word [esi + 4], dx
lea edx, [eax + 2]
jmp 0x427b60
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x427b60
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x68]
push eax
mov ecx, esi
call fcn.00408fa0
mov dword [esp + 0x18], 1
mov byte [esp + 0x278], 0
cmp dword [esp + 0x44], edi
jb 0x427b9f
mov ecx, dword [esp + 0x30]
push ecx
call fcn.004a9c11
add esp, 4
xor edx, edx
mov dword [esp + 0x44], ebp
mov dword [esp + 0x40], ebx
mov word [esp + 0x30], dx
mov eax, esi
mov ecx, dword [esp + 0x270]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x258]
xor ecx, esp
call fcn.004a9c1c
add esp, 0x268
ret