Function at 0x4021b0
Capabilities:
Get file size
Get system information on windows
Read file via mapping

Disassembly:
push 0xffffffffffffffff
push 0x53555d
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xb8
push ebx
push ebp
push esi
mov esi, dword [esp + 0xd4]
push edi
xor edi, edi
cmp esi, edi
mov dword [esp + 0x10], ecx
je 0x402450
lea ecx, [esp + 0x3c]
call fcn.0050dff1
lea ecx, [esp + 0x20]
mov dword [esp + 0xd0], edi
call fcn.0050daae
mov eax, dword [0x591288]
mov dword [esp + 0x30], eax
mov ebp, vtable.CFileException.0
or ebx, 0xffffffff
push edi
lea ecx, [esp + 0x34]
mov byte [esp + 0xd4], 2
mov dword [esp + 0x24], ebp
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], ebx
call fcn.0050d586
lea ecx, [esp + 0x20]
mov byte [esp + 0xd0], 3
push ecx
push 0x40
push esi
lea ecx, [esp + 0x48]
call fcn.0050e1a3
mov esi, dword [esp + 0x40]
test eax, eax
jne 0x402254
mov esi, dword [esp + 0xf0]
cmp esi, ebx
je 0x40242b
lea edx, [esp + 0x38]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, dword [esp + 0xdc]
mov ebp, dword [esp + 0xe4]
mov edi, dword [esp + 0xe0]
mov edx, ebx
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0xe8]
add edx, ebp
mov ecx, edi
adc ecx, eax
mov eax, dword [esp + 0x38]
cmp eax, ecx
jg 0x4022c9
jl 0x4022a0
cmp dword [esp + 0x34], edx
jae 0x4022c9
mov dword [esp + 0x20], vtable.CFileException.0
lea ecx, [esp + 0x30]
mov byte [esp + 0xd0], 4
call fcn.0050d3fd
mov dword [esp + 0xd0], 0xffffffff
jmp 0x402447
push 0
push 0
push 0
push 2
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
test eax, eax
mov dword [esp + 0x14], eax
je 0x4023f7
lea ecx, [esp + 0x4c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov esi, dword [esp + 0x68]
mov edx, dword [esp + 0xe8]
xor eax, eax
shl esi, 8
push eax
push esi
push edx
push ebp
call fcn.004eddc0
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x18], eax
lea eax, [esp + 0x70]
push eax
call fcn.00401ab0
mov eax, dword [esp + 0x18]
test eax, eax
jbe 0x402375
mov dword [esp + 0x18], eax
mov edx, dword [esp + 0x14]
push esi
push ebx
mov ecx, edi
push edi
push 4
sar ecx, 0x1f
push edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebp, eax
test ebp, ebp
je 0x40235a
mov ecx, dword [esp + 0x10]
push esi
lea eax, [esp + 0x74]
push ebp
push eax
call fcn.00401b00
push ebp
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
add ebx, esi
mov eax, 0
adc edi, eax
mov eax, dword [esp + 0x18]
dec eax
mov dword [esp + 0x18], eax
jne 0x402328
mov ebp, dword [esp + 0xe4]
mov edx, dword [esp + 0xdc]
mov ecx, dword [esp + 0xe0]
mov esi, dword [esp + 0xe8]
mov eax, edx
sub eax, ebx
sbb ecx, edi
add eax, ebp
adc ecx, esi
mov dword [esp + 0x1c], ecx
js 0x4023d6
jg 0x4023a0
test eax, eax
jbe 0x4023d6
sub ebp, ebx
mov ecx, edi
add ebp, edx
mov edx, dword [esp + 0x14]
push ebp
push ebx
push edi
push 4
sar ecx, 0x1f
push edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov esi, eax
test esi, esi
je 0x4023d6
mov ecx, dword [esp + 0x10]
push ebp
lea eax, [esp + 0x74]
push esi
push eax
call fcn.00401b00
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov edx, dword [esp + 0xec]
lea ecx, [esp + 0x70]
push ecx
mov ecx, dword [esp + 0x14]
push edx
call fcn.00401bb0
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x20], vtable.CFileException.0
lea ecx, [esp + 0x30]
mov byte [esp + 0xd0], 5
call fcn.0050d3fd
lea ecx, [esp + 0x3c]
mov dword [esp + 0xd0], 0xffffffff
call fcn.0050e0e6
mov eax, 1
jmp 0x402452
mov dword [esp + 0x20], ebp
lea ecx, [esp + 0x30]
mov byte [esp + 0xd0], 6
call fcn.0050d3fd
mov dword [esp + 0xd0], ebx
lea ecx, [esp + 0x3c]
call fcn.0050e0e6
xor eax, eax
mov ecx, dword [esp + 0xc8]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0xc4
ret 0x1c