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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x21070b09
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x28
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x10], 0
push 1
mov ecx, dword [ebp - 0x2c]
call fcn.2102c2ae
cmp dword [ebp + 0xc], 0
jne 0x2102c386
push 0
push 0
push 3
push 0
push 3
push 0x80000000
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ecx, dword [ebp - 0x2c]
mov dword [ecx], eax
jmp 0x2102c3a4
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ecx, dword [ebp - 0x2c]
mov dword [ecx], eax
mov edx, dword [ebp - 0x2c]
cmp dword [edx], 0xffffffff
jne 0x2102c495
cmp dword [ebp + 0x14], 0
je 0x2102c3bb
jmp 0x2102c638
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
push eax
call fcn.210117f2
mov dword [ebp - 0x18], eax
mov ecx, dword [0x21085bf0]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x1c]
push edx
push str.CreateFile_failed__error_code__d
lea eax, [ebp - 0x14]
push eax
call fcn.2106288e
add esp, 0xc
cmp dword [ebp - 0x18], 0
je 0x2102c40e
mov ecx, dword [ebp - 0x18]
movsx edx, byte [ecx]
test edx, edx
je 0x2102c40e
mov dword [ebp - 0x30], 0
jmp 0x2102c415
mov dword [ebp - 0x30], 1
cmp dword [ebp - 0x30], 0
jne 0x2102c434
push 0x2108271c
lea ecx, [ebp - 0x14]
call fcn.21063d77
mov eax, dword [ebp - 0x18]
push eax
lea ecx, [ebp - 0x14]
call fcn.21063d77
push 0x21082720
lea ecx, [ebp - 0x14]
call fcn.21063d77
push 0x21082724
lea ecx, [ebp - 0x14]
call fcn.21063d77
push 0x21082738
lea ecx, [ebp - 0x14]
call fcn.21063d77
mov ecx, dword [ebp + 8]
push ecx
lea ecx, [ebp - 0x14]
call fcn.21063d77
mov edx, dword [ebp - 0x14]
push edx
call fcn.21010b9a
add esp, 4
mov eax, dword [ebp - 0x1c]
push eax
push str.CreateFile
call fcn.2101080a
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.21063a5b
jmp 0x2102c638
mov ecx, dword [ebp - 0x2c]
mov dword [ecx + 4], 1
push 0
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [ebp - 0x2c]
mov dword [ecx + 0x10], eax
mov edx, dword [ebp - 0x2c]
cmp dword [edx + 0x10], 0xffffffff
jne 0x2102c4d1
cmp dword [ebp + 0x14], 0
jne 0x2102c4cc
push str.GetFileSize
call fcn.210107ec
jmp 0x2102c638
push 0
mov eax, dword [ebp + 0x10]
push eax
push 0
mov ecx, dword [ebp + 0xc]
neg ecx
sbb ecx, ecx
and ecx, 2
add ecx, 2
push ecx
push 0
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov ecx, dword [ebp - 0x2c]
mov dword [ecx + 8], eax
mov edx, dword [ebp - 0x2c]
cmp dword [edx + 8], 0
jne 0x2102c5ea
cmp dword [ebp + 0x14], 0
je 0x2102c513
jmp 0x2102c638
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
push eax
call fcn.210117f2
mov dword [ebp - 0x24], eax
mov ecx, dword [0x21085bf0]
mov dword [ebp - 0x20], ecx
mov dword [ebp - 4], 1
mov edx, dword [ebp - 0x28]
push edx
push str.CreateFileMapping_failed__error_code__d
lea eax, [ebp - 0x20]
push eax
call fcn.2106288e
add esp, 0xc
cmp dword [ebp - 0x24], 0
je 0x2102c566
mov ecx, dword [ebp - 0x24]
movsx edx, byte [ecx]
test edx, edx
je 0x2102c566
mov dword [ebp - 0x34], 0
jmp 0x2102c56d
mov dword [ebp - 0x34], 1
cmp dword [ebp - 0x34], 0
jne 0x2102c58c
push 0x2108277c
lea ecx, [ebp - 0x20]
call fcn.21063d77
mov eax, dword [ebp - 0x24]
push eax
lea ecx, [ebp - 0x20]
call fcn.21063d77
push 0x21082780
lea ecx, [ebp - 0x20]
call fcn.21063d77
push str.CMappedFile::Open
lea ecx, [ebp - 0x20]
call fcn.21063d77
push 0x21082798
lea ecx, [ebp - 0x20]
call fcn.21063d77
mov ecx, dword [ebp + 8]
push ecx
lea ecx, [ebp - 0x20]
call fcn.21063d77
mov edx, dword [ebp - 0x20]
push edx
call fcn.21010b9a
add esp, 4
mov eax, dword [ebp - 0x28]
push eax
push 0x2108279c
call fcn.2101080a
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.21063a5b
jmp 0x2102c638
push 0
push 0
push 0
mov ecx, dword [ebp + 0xc]
neg ecx
sbb ecx, ecx
and ecx, 0xf001b
add ecx, 4
push ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + 8]
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ecx, dword [ebp - 0x2c]
mov dword [ecx + 0xc], eax
mov edx, dword [ebp - 0x2c]
cmp dword [edx + 0xc], 0
jne 0x2102c62f
cmp dword [ebp + 0x14], 0
jne 0x2102c62d
push 0x210827b0
call fcn.210107ec
jmp 0x2102c638
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 0xc]
mov dword [ebp - 0x10], ecx
cmp dword [ebp - 0x10], 0
jne 0x2102c648
push 1
mov ecx, dword [ebp - 0x2c]
call fcn.2102c2ae
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0x10