Function at 0x477580
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4cae78
mov eax, dword fs:[0]
push eax
mov eax, 0x1024
call fcn.004aa1a0
mov eax, dword [0x4fad60]
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 edi, ecx
mov dword [ebp - 0x1020], edi
xor ebx, ebx
mov dword [ebp - 4], ebx
mov eax, dword [ebp + 8]
mov esi, 8
cmp dword [ebp + 0x1c], esi
jae 0x4775cf
lea eax, [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4775e5
shr eax, 4
not eax
and eax, 1
jne 0x4775fd
cmp dword [ebp + 0x1c], esi
jb 0x4775f6
mov eax, dword [ebp + 8]
push eax
call fcn.00490a16
add esp, 4
xor eax, eax
jmp 0x477797
push 0xffe
lea edx, [ebp - 0x100e]
xor ecx, ecx
push ebx
push edx
mov word [ebp - 0x1010], cx
call fcn.00497ad0
add esp, 0xc
push 0x800
lea eax, [ebp - 0x1010]
push ebx
push eax
call fcn.00497ad0
mov eax, dword [ebp + 8]
add esp, 0xc
cmp dword [ebp + 0x1c], esi
jae 0x47763b
lea eax, [ebp + 8]
mov esi, dword [ebp + 0x18]
add esi, esi
push esi
push eax
lea ecx, [ebp - 0x1010]
push ecx
call fcn.00498770
add esp, 0xc
push 4
push 0x1000
add esi, 2
push esi
push ebx
push edi
mov dword [ebp - 0x101c], ebx
mov dword [ebp - 0x1014], ebx
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov ebx, eax
mov dword [ebp - 0x1024], ebx
test ebx, ebx
je 0x47777f
push 0
push esi
lea edx, [ebp - 0x1010]
push edx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x477759
cmp dword [ebp + 0x24], 1
jne 0x4776b7
lea eax, [ebp - 0x1018]
push eax
call fcn.00477450
mov esi, dword [ebp - 0x1018]
add esp, 4
jmp 0x47771b
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push 0x4de204
push str.Kernel32.dll
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.Kernel32.dll
mov esi, eax
call edi
push 0xc
lea ecx, [ebp - 0x1030]
mov edi, eax
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.PSAPI.DLL_GetModuleInformation]
cmp esi, edi
jb 0x477702
mov edx, dword [ebp - 0x102c]
add edx, edi
cmp esi, edx
jbe 0x47771b
push str.Kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov edi, 0x4de204
mov esi, eax
call fcn.00462de0
mov esi, eax
test esi, esi
je 0x477759
mov edi, dword [ebp - 0x1020]
mov ecx, ebx
mov ebx, esi
call fcn.004778d0
mov esi, eax
mov dword [ebp - 0x101c], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
test esi, esi
je 0x477753
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [ebp - 0x1014], 1
mov ebx, dword [ebp - 0x1024]
mov eax, dword [ebp - 0x1020]
push 0x8000
push 0
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov eax, dword [ebp - 0x101c]
test eax, eax
je 0x47777f
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 0x1c], 8
jb 0x477791
mov ecx, dword [ebp + 8]
push ecx
call fcn.00490a16
add esp, 4
mov eax, dword [ebp - 0x1014]
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.00490a21
mov esp, ebp
pop ebp
ret