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

Disassembly:
push 0xffffffffffffffff
push 0x4d0cc3
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 0x4278e2
sub eax, edx
sar eax, 1
push eax
push ebp
lea ecx, [esp + 0x34]
call fcn.00409920
mov ebx, 1
mov dword [esp + 0x278], ebx
push 0x4eadec
xor eax, eax
lea edx, [esp + 0x30]
call fcn.0042e5c0
mov edi, ebx
lea ebx, [esp + 0x2c]
mov esi, eax
call fcn.0042e6a0
cmp eax, 0xffffffff
je 0x42798c
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.004082a0
mov byte [esp + 0x278], 1
mov edi, 8
cmp dword [esp + 0x60], edi
jb 0x427973
mov ecx, dword [esp + 0x4c]
push ecx
call fcn.004a9741
add esp, 4
xor edx, edx
mov dword [esp + 0x60], 7
mov dword [esp + 0x5c], 0
mov word [esp + 0x4c], dx
jmp 0x427991
mov edi, 8
xor eax, eax
mov word [esp + 0x64], ax
mov eax, dword [esp + 0x30]
cmp dword [esp + 0x44], edi
jae 0x4279a6
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 0x427b9a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x427b82
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.004082a0
mov byte [esp + 0x278], 3
mov dword [esp + 0x1c], 0x4eade8
mov dword [esp + 0x20], 0x4eadf0
mov dword [esp + 0x24], str..dll
mov dword [esp + 0x28], str..com
jmp 0x427a25
mov edi, 8
mov eax, dword [esp + 0x30]
cmp dword [esp + 0x44], edi
jae 0x427a33
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x68]
push 0x104
push ecx
call fcn.004aa50b
mov esi, dword [esp + ebp*4 + 0x28]
push esi
lea edx, [esp + 0x74]
push 0x104
push edx
call fcn.004ab8e3
add esp, 0x18
push 0x104
lea eax, [esp + 0x68]
push eax
mov ecx, eax
push ecx
call ebx
test eax, eax
jne 0x427b4e
push 0x104
lea edx, [esp + 0x68]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push 0x4ead1c
lea eax, [esp + 0x68]
push 0x104
push eax
call fcn.004ab8e3
mov eax, dword [esp + 0x3c]
add esp, 0xc
cmp dword [esp + 0x44], edi
jae 0x427aa6
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x68]
push 0x104
push ecx
call fcn.004ab8e3
push esi
lea edx, [esp + 0x74]
push 0x104
push edx
call fcn.004ab8e3
add esp, 0x18
lea edi, [esp + 0x64]
call fcn.00427610
test al, al
jne 0x427b49
push 0x104
mov eax, edi
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push 0x4ead1c
mov ecx, edi
push 0x104
push ecx
call fcn.004ab8e3
mov eax, dword [esp + 0x3c]
add esp, 0xc
cmp dword [esp + 0x44], 8
jae 0x427b08
lea eax, [esp + 0x30]
push eax
lea edx, [esp + 0x68]
push 0x104
push edx
call fcn.004ab8e3
push esi
lea eax, [esp + 0x74]
push 0x104
push eax
call fcn.004ab8e3
add esp, 0x18
lea edi, [esp + 0x64]
call fcn.00427610
test al, al
jne 0x427b49
xor ecx, ecx
inc ebp
cmp ebp, 3
mov word [esp + 0x64], cx
jle 0x427a20
mov edi, 8
mov byte [esp + 0x278], 1
cmp dword [esp + 0x60], edi
jb 0x427b69
mov edx, dword [esp + 0x4c]
push edx
call fcn.004a9741
add esp, 4
xor eax, eax
mov dword [esp + 0x60], 7
mov dword [esp + 0x5c], 0
mov word [esp + 0x4c], ax
jmp 0x427b9a
push 0x104
push ebp
lea ecx, [esp + 0x6c]
push 0x104
push ecx
call fcn.004ab7c6
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 0x427bc0
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x427bc0
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x68]
push eax
mov ecx, esi
call fcn.00409920
mov dword [esp + 0x18], 1
mov byte [esp + 0x278], 0
cmp dword [esp + 0x44], edi
jb 0x427bff
mov ecx, dword [esp + 0x30]
push ecx
call fcn.004a9741
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.004a974c
add esp, 0x268
ret