Function at 0x489946
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4ac0aa
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
sub esp, 0x68
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x5c], ecx
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 4], 0
push 0
push 0x8000000
push 3
push 0
push 1
push 0xc0000000
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0xffffffff
jne 0x4899d7
or eax, 0xffffffff
jmp 0x489c42
lea ecx, [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x14], eax
push 0
push 0
push 0
push 0x8000004
push 0
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x489a1a
mov ecx, dword [ebp - 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, 0xffffffff
jmp 0x489c42
push 0
push 0
push 0
push 0xf001f
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x489a54
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, 0xffffffff
jmp 0x489c42
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x4c], 0x10
lea edx, [ebp - 0x50]
push edx
mov ecx, dword [ebp - 0x5c]
add ecx, 4
call fcn.004172b0
lea eax, [ebp - 0x54]
push eax
mov ecx, dword [ebp - 0x5c]
add ecx, 4
call fcn.00436710
mov dword [ebp - 0x60], eax
mov ecx, dword [ebp - 0x60]
push ecx
lea ecx, [ebp - 0x50]
call fcn.00448ed0
mov byte [ebp - 0x64], al
mov edx, dword [ebp - 0x64]
and edx, 0xff
test edx, edx
je 0x489add
lea ecx, [ebp - 0x50]
call fcn.00432be0
mov dword [ebp - 0x68], eax
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x68]
mov edx, dword [ecx]
add edx, 0x18
push edx
call dword [sym.imp.ntdll.dll__stricmp]
add esp, 8
test eax, eax
jne 0x489acd
jmp 0x489add
push 0
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x50]
call fcn.00417310
jmp 0x489a78
lea ecx, [ebp - 0x50]
call fcn.00432be0
mov dword [ebp - 0x6c], eax
mov ecx, dword [ebp - 0x6c]
mov edx, dword [ecx]
mov eax, dword [edx + 0xc]
mov dword [ebp - 0x40], eax
lea ecx, [ebp - 0x50]
call fcn.00432be0
mov dword [ebp - 0x70], eax
mov ecx, dword [ebp - 0x70]
mov edx, dword [ecx]
mov dword [ebp - 0x34], edx
lea ecx, [ebp - 0x50]
call fcn.00432be0
mov dword [ebp - 0x74], eax
mov eax, dword [ebp - 0x74]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x3c]
add edx, dword [ecx + 0x14]
mov dword [ebp - 0x48], edx
lea eax, [ebp - 0x4c]
push eax
push 4
push 5
mov ecx, dword [ebp - 0x48]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0
je 0x489b63
cmp dword [ebp - 0x40], 0
jl 0x489b61
cmp dword [ebp - 0x40], 8
jae 0x489b61
push 5
mov edx, dword [ebp - 0x40]
imul edx, edx, 5
add edx, 0x539b40
push edx
mov eax, dword [ebp - 0x48]
push eax
call sub.ntdll.dll_memcpy
add esp, 0xc
jmp 0x489b89
mov ecx, dword [ebp - 0x3c]
push ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, 0xffffffff
jmp 0x489c42
lea ecx, [ebp - 0x4c]
push ecx
mov edx, dword [ebp - 0x4c]
push edx
push 5
mov eax, dword [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea ecx, [ebp - 0x50]
call fcn.00432be0
mov dword [ebp - 0x78], eax
mov ecx, dword [ebp - 0x78]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x3c]
add eax, dword [edx + 0x10]
mov dword [ebp - 0x48], eax
lea ecx, [ebp - 0x4c]
push ecx
push 4
push 0x28
mov edx, dword [ebp - 0x48]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov dword [ebp - 0x44], eax
push 0x28
push 0
mov eax, dword [ebp - 0x48]
push eax
call sub.ntdll.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x4c]
push ecx
push 4
push 0x28
mov edx, dword [ebp - 0x48]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [ebp - 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
jmp 0x489c42
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4