Function at 0x40165a
Capabilities:
Get file size
Read file via mapping

Disassembly:
push ebp
sub esp, 0x210
lea ebp, [esp - 4]
mov eax, dword [0x417030]
xor eax, ebp
mov dword [ebp + 0x210], eax
push 0x18
mov eax, 0x410b5a
call fcn.0040787d
xor eax, eax
xor esi, esi
push 0x206
mov word [ebp], ax
mov edi, edx
lea eax, [ebp + 2]
push esi
push eax
mov ebx, ecx
mov dword [ebp - 0x14], edi
mov dword [edi], esi
call fcn.00407150
add esp, 0xc
push 0x104
lea eax, [ebp]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push esi
push 0x80
push 3
push esi
push 1
push 0x80000000
lea eax, [ebp]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x24], ebx
mov dword [ebp - 4], esi
cmp ebx, 0xffffffff
jne 0x4016fd
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x210]
xor ecx, ebp
call fcn.00405b6c
add ebp, 0x214
leave
ret
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x20], eax
cmp eax, esi
jne 0x401715
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4016d8
push esi
push esi
push esi
push 2
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 1
push esi
cmp eax, esi
jne 0x40173b
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push ebx
call esi
jmp 0x4016d8
push esi
push esi
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [edi], eax
cmp eax, esi
jne 0x40176b
cmp dword [ebp - 0x10], 0xffffffff
je 0x40175b
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
jmp 0x4016da
mov ecx, dword [eax + 0x3c]
movzx edx, word [ecx + eax + 6]
cmp dx, si
jbe 0x40180d
movzx edx, dx
imul edx, edx, 0x28
add edx, ecx
lea eax, [edx + eax + 0xd0]
mov ebx, dword [eax + 0x14]
add ebx, dword [eax + 0x10]
cmp ebx, 0xffffffff
je 0x40180d
cmp ebx, dword [ebp - 0x20]
jge 0x40180d
mov esi, str.zzd.
lea edi, [ebp + 0x208]
movsd dword es:[edi], dword [esi]
lea eax, [ebp + 0x208]
movsb byte es:[edi], byte [esi]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4017b1
sub eax, edx
mov esi, eax
lea eax, [esi + 1]
push eax
mov dword [ebp - 0x1c], esi
call fcn.00405b61
mov ecx, dword [ebp - 0x14]
mov ecx, dword [ecx]
push esi
add ecx, ebx
push ecx
push eax
mov dword [ebp - 0x18], eax
call fcn.00408820
add esp, 0x10
mov ecx, esi
mov esi, dword [ebp - 0x18]
lea edi, [ebp + 0x208]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x401846
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
mov ecx, dword [eax + 0x3c]
mov ebx, dword [ecx + eax + 8]
cmp ebx, dword [ebp - 0x20]
jle 0x401825
push dword [ebp - 0x18]
call fcn.0040687f
mov edi, dword [ebp - 0x14]
pop ecx
xor esi, esi
mov eax, dword [edi]
cmp eax, esi
je 0x40174c
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [edi], esi
jmp 0x40174c
push dword [ebp - 0x1c]
mov esi, dword [ebp - 0x18]
add eax, ebx
push eax
push esi
call fcn.00408820
mov ecx, dword [ebp - 0x1c]
add esp, 0xc
lea edi, [ebp + 0x208]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x4017ff
push dword [ebp - 0x18]
call fcn.0040687f
mov eax, dword [ebp - 0x14]
mov esi, dword [eax]
add esi, dword [ebp - 0x1c]
pop ecx
add esi, ebx
jmp 0x40174c