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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c70a8
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x4fa078]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x3c], esi
mov eax, dword [esi + 0xc]
test eax, eax
je 0x410845
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [esi + 0xc], 0
mov eax, dword [esi + 4]
mov ecx, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x410862
push eax
call ecx
mov ecx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 4], 0
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x410872
push eax
call ecx
mov dword [esi], 0xffffffff
xor edi, edi
mov dword [esi + 8], 0
mov edx, 7
mov dword [ebp - 0x1c], edi
xor eax, eax
mov dword [ebp - 0x18], edx
mov word [ebp - 0x2c], ax
mov ecx, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 4], eax
lea eax, [ecx + 1]
mov dword [ebp - 0x38], eax
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4108a0
sub ecx, dword [ebp - 0x38]
je 0x410908
mov esi, dword [ebp + 8]
nop
movsx ax, byte [ebx + esi]
movzx ecx, ax
cmp edi, edx
jae 0x4108d9
lea eax, [edi + 1]
cmp edx, 8
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x2c]
cmovae eax, dword [ebp - 0x2c]
mov word [eax + edi*2], cx
xor ecx, ecx
mov word [eax + edi*2 + 2], cx
jmp 0x4108ea
push ecx
mov byte [ebp - 0x38], 0
push dword [ebp - 0x38]
push ecx
lea ecx, [ebp - 0x2c]
call fcn.00430860
mov eax, esi
inc ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4108f0
sub eax, edx
mov edx, dword [ebp - 0x18]
cmp ebx, eax
jae 0x410905
mov edi, dword [ebp - 0x1c]
jmp 0x4108b0
mov esi, dword [ebp - 0x3c]
push 0
push 0
push 3
push 0
cmp edx, 8
lea eax, [ebp - 0x2c]
push 1
cmovae eax, dword [ebp - 0x2c]
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi], eax
cmp eax, 0xffffffff
je 0x4109b3
lea ecx, [ebp - 0x34]
xorps xmm0, xmm0
push ecx
push eax
movlpd qword [ebp - 0x34], xmm0
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x4109b3
mov eax, dword [ebp - 0x34]
push 0
push eax
push 0
push 2
push 0
push dword [esi]
mov dword [esi + 8], eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [esi + 4], eax
test eax, eax
jne 0x4109e3
mov eax, dword [esi + 0xc]
test eax, eax
je 0x410996
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [esi + 4]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0xc], 0
test eax, eax
je 0x41099c
push eax
call edi
mov dword [esi + 4], 0
jmp 0x41099c
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x4109ac
push eax
call edi
mov dword [esi], 0xffffffff
mov dword [esi + 8], 0
xor bl, bl
mov edx, dword [ebp - 0x18]
cmp edx, 8
jb 0x410a10
mov ecx, dword [ebp - 0x2c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x410a06
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x410a30
jmp 0x410a06
push 0
push 0
push 0
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [esi + 0xc], eax
test eax, eax
jne 0x410a02
mov ecx, esi
call fcn.00410a40
jmp 0x4109b3
mov bl, 1
jmp 0x4109b5
push edx
push ecx
call fcn.0044bf44
add esp, 8
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0044b7d5
mov esp, ebp
pop ebp
ret 4
call fcn.004aba6c
int3