Function at 0x4084a0
Capabilities:
Get common file path
Get file size
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x415318
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push ebx
push esi
push edi
mov eax, dword [0x41cbc8]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
mov dword [ebp - 0x1c], edi
mov eax, dword [0x41cb94]
mov edx, dword [eax + 0xc]
xor ebx, ebx
mov ecx, 0x41cb94
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
call edx
lea esi, [eax + 0x10]
mov dword [ebp - 0x14], esi
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x3e8
or eax, ecx
mov dword [ebp - 4], ebx
mov byte [ebp - 4], 1
jge 0x40851b
push 0x3e8
lea ecx, [ebp - 0x14]
call fcn.00401340
mov esi, dword [ebp - 0x14]
push esi
push 0x3e8
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.0040a539
add esp, 8
cmp eax, ebx
jl 0x40865d
cmp eax, dword [esi - 8]
jg 0x40865d
push 8
mov dword [esi - 0xc], eax
push str.dgrn.exe
lea ecx, [ebp - 0x14]
mov byte [eax + esi], 0
call fcn.00407b10
mov eax, dword [edi + 0x28]
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
mov dword [ebp - 0x18], edi
cmp edi, 0xffffffff
jne 0x408594
push 0x41a768
lea eax, [ebp - 0x28]
push eax
mov dword [ebp - 0x28], 3
call fcn.0040a3d4
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push ebx
push ebx
push ebx
push 2
push ebx
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [ebp - 0x24], eax
cmp eax, ebx
jne 0x4085c7
push 0x41a768
lea ecx, [ebp - 0x2c]
push ecx
mov dword [ebp - 0x2c], 4
call fcn.0040a3d4
push ebx
push ebx
push ebx
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebx, eax
mov dword [ebp - 0x20], ebx
test ebx, ebx
jne 0x4085f1
push 0x41a768
lea edx, [ebp - 0x30]
push edx
mov dword [ebp - 0x30], 5
call fcn.0040a3d4
cmp dword [esi + ebx - 0xc], 0x15032001
je 0x408610
push 0x41a768
lea eax, [ebp - 0x34]
push eax
mov dword [ebp - 0x34], 6
call fcn.0040a3d4
mov esi, dword [esi + ebx - 8]
add esi, ebx
cmp dword [esi + 0x44], 0
je 0x40864f
mov eax, dword [ebp - 0x14]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x38], esp
mov edi, esp
push eax
call fcn.00401190
mov ecx, dword [ebp - 0x1c]
add esp, 4
add eax, 0x10
push esi
mov dword [edi], eax
call fcn.00401f10
mov edi, dword [ebp - 0x18]
test al, al
je 0x40864f
mov ecx, dword [esi + 0x44]
lea esi, [esi + ecx + 0x48]
jmp 0x408616
mov ecx, dword [ebp - 0x1c]
lea edx, [ebp - 0x14]
push edx
call fcn.00407aa0
jmp 0x408673
push 0x80070057
call fcn.00401000
mov eax, 0x40866d
ret
test ebx, ebx
je 0x40867e
push ebx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x40868c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, 0xffffffff
je 0x408698
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4086be
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret