Function at 0x51c960
Capabilities:
Get file size
Get system information on windows

Disassembly:
test dword [0x87ed4c], 0xfffff000
jne 0x51c990
test dword [0x87ed4c], 0xffffffff
jne 0x51ccb0
call fcn.007663a0
jmp fcn.0051c960
push edi
push esi
push ebp
push ebx
sub esp, 0x11c
mov ebp, ecx
mov esi, dword [esp + 0x130]
xor eax, eax
mov dword [ebp], eax
lea edx, [esp + 0x114]
mov dword [ebp + 4], eax
mov dword [ebp + 8], eax
mov dword [ebp + 0xc], eax
mov dword [ebp + 0x10], eax
mov dword [ebp + 0x14], eax
mov dword [ebp + 0x18], 0x80000000
mov dword [ebp + 0x1c], 0xffffffff
push edx
push dword [esi]
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x51cc59
mov ebx, dword [esp + 0x114]
mov eax, dword [esp + 0x118]
mov edx, ebx
sub edx, 0xffffffff
sbb eax, 0
jb 0x51c9fd
or edx, eax
jne 0x51cc19
mov edi, dword [esi]
lea esi, [esp + 0xdc]
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x51ca17
xor esi, esi
jmp 0x51ca61
xor eax, eax
push eax
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x51ca13
mov dword [esp + 0xd4], esi
xor eax, eax
lea edx, [esp + 0xd0]
mov dword [esp + 0xd0], 0xc
mov dword [esp + 0xd8], eax
push eax
push eax
push eax
push 2
push edx
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov esi, eax
test esi, esi
jne 0x51caf2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0xb0], eax
mov ecx, 0x78c5a0
mov edx, 0x78c698
cmp eax, dword [ecx]
je 0x51cc11
add ecx, 8
cmp ecx, edx
jne 0x51ca78
mov eax, 1
mov edx, dword [ebp]
mov dword [esp + 0xb4], eax
test edx, edx
je 0x51cabd
mov eax, dword [ebp + 4]
test eax, eax
jbe 0x51caac
push eax
push edx
call dword [sym.imp.KERNEL32.dll_FlushViewOfFile]
mov edx, dword [ebp]
sub edx, dword [ebp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [ebp], 0
mov eax, dword [ebp + 0x1c]
cmp eax, 0xffffffff
je 0x51cad3
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp + 0x1c], 0xffffffff
lea ecx, [esp]
lea eax, [esp + 0xb0]
push eax
call fcn.0058f3b0
push 0x8339e0
lea eax, [esp + 4]
push eax
call fcn.0074444a
lea eax, [esp + 0xf0]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov dword [esp + 0x84], esi
mov esi, dword [esp + 0x10c]
xor edx, edx
xor eax, eax
div esi
mov dword [ebp + 4], ebx
mov ecx, eax
mul esi
imul ecx, esi
xor esi, esi
xor edi, edi
sub edi, eax
mov eax, esi
sbb eax, edx
mov dword [ebp + 0x10], edi
mov dword [ebp + 0x14], eax
add edi, ebx
test ebx, ebx
cmovne ebx, edi
mov dword [ebp + 8], esi
mov dword [ebp + 0xc], esi
push esi
push ebx
push ecx
push edx
push 4
mov esi, dword [esp + 0x98]
push esi
call dword [sym.imp.KERNEL32.dll_MapViewOfFileEx]
mov dword [ebp], eax
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp]
test eax, eax
je 0x51cb75
add eax, dword [ebp + 0x10]
mov dword [ebp], eax
mov eax, ebp
add esp, 0x11c
pop ebx
pop ebp
pop esi
pop edi
ret 0x18
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0xc8], eax
mov ecx, 0x78c5a0
mov edx, 0x78c698
cmp eax, dword [ecx]
je 0x51cc0c
add ecx, 8
cmp ecx, edx
jne 0x51cb8c
mov eax, 1
mov edx, dword [ebp]
mov dword [esp + 0xcc], eax
test edx, edx
je 0x51cbcd
mov eax, dword [ebp + 4]
test eax, eax
jbe 0x51cbbc
push eax
push edx
call dword [sym.imp.KERNEL32.dll_FlushViewOfFile]
mov edx, dword [ebp]
sub edx, dword [ebp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [ebp], 0
mov eax, dword [ebp + 0x1c]
cmp eax, 0xffffffff
je 0x51cbe3
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp + 0x1c], 0xffffffff
lea ebx, [esp + 0x84]
lea eax, [esp + 0xc8]
push eax
mov ecx, ebx
call fcn.0058f3b0
push 0x8339e0
push ebx
call fcn.0074444a
mov eax, dword [ebp]
jmp 0x51cb60
mov eax, dword [ecx + 4]
jmp 0x51cb9c
mov eax, dword [ecx + 4]
jmp 0x51ca8c
mov dword [esp + 0xc0], 0
lea ebx, [esp + 0x2c]
lea eax, [esp + 0xc0]
mov ecx, ebx
mov dword [esp + 0xc4], 0x12
push eax
call fcn.0058f3b0
push 0x8339e0
push ebx
call fcn.0074444a
mov ebx, dword [esp + 0x114]
jmp 0x51c9fd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0xb8], eax
mov ecx, 0x78c5a0
mov edx, 0x78c698
cmp eax, dword [ecx]
je 0x51ccaa
add ecx, 8
cmp ecx, edx
jne 0x51cc70
mov eax, 1
mov dword [esp + 0xbc], eax
lea ebx, [esp + 0x58]
lea eax, [esp + 0xb8]
mov ecx, ebx
push eax
call fcn.0058f3b0
push 0x8339e0
push ebx
call fcn.0074444a
jmp 0x51c9dd
mov eax, dword [ecx + 4]
jmp 0x51cc80
push edi
push esi
push ebp
push ebx
sub esp, 0x11c
mov ebp, ecx
mov esi, dword [esp + 0x130]
xor eax, eax
mov dword [ebp], eax
mov dword [ebp + 4], eax
mov dword [ebp + 8], eax
mov dword [ebp + 0xc], eax
mov dword [ebp + 0x10], eax
mov dword [ebp + 0x14], eax
mov dword [ebp + 0x18], 0x80000000
mov dword [ebp + 0x1c], 0xffffffff
lea edx, [esp + 0x114]
push edx
push dword [esi]
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x51cf7d
mov ebx, dword [esp + 0x114]
mov eax, dword [esp + 0x118]
mov edx, ebx
sub edx, 0xffffffff
sbb eax, 0
jb 0x51cd1d
or edx, eax
jne 0x51cf3d
mov edi, dword [esi]
lea esi, [esp + 0xdc]
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x51cd37
xor esi, esi
jmp 0x51cd81
xor eax, eax
push eax
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x51cd33
mov dword [esp + 0xd4], esi
mov dword [esp + 0xd0], 0xc
xor eax, eax
mov dword [esp + 0xd8], eax
lea edx, [esp + 0xd0]
push eax
push eax
push eax
push 2
push edx
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov esi, eax
test esi, esi
jne 0x51ce12
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0xb0], eax
mov ecx, 0x78c5a0
mov edx, 0x78c698
cmp eax, dword [ecx]
je 0x51cf35
add ecx, 8
cmp ecx, edx
jne 0x51cd98
mov eax, 1
mov dword [esp + 0xb4], eax
mov edx, dword [ebp]
test edx, edx
je 0x51cddd
mov eax, dword [ebp + 4]
test eax, eax
jbe 0x51cdcc
push eax
push edx
call dword [sym.imp.KERNEL32.dll_FlushViewOfFile]
mov edx, dword [ebp]
sub edx, dword [ebp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [ebp], 0
mov eax, dword [ebp + 0x1c]
cmp eax, 0xffffffff
je 0x51cdf3
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp + 0x1c], 0xffffffff
lea ecx, [esp]
lea eax, [esp + 0xb0]
push eax
call fcn.0058f3b0
push 0x8339e0
lea eax, [esp + 4]
push eax
call fcn.0074444a
lea eax, [esp + 0xf0]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov dword [esp + 0x84], esi
mov esi, dword [esp + 0x10c]
xor edx, edx
xor eax, eax
div esi
mov ecx, eax
imul ecx, esi
mul esi
xor esi, esi
xor edi, edi
sub edi, eax
mov eax, esi
sbb eax, edx
mov dword [ebp + 0x10], edi
mov dword [ebp + 0x14], eax
mov dword [ebp + 8], esi
mov dword [ebp + 0xc], esi
mov dword [ebp + 4], ebx
add edi, ebx
test ebx, ebx
jne 0x51ce5f
mov edi, 0
push esi
push edi
push ecx
push edx
push 4
mov esi, dword [esp + 0x98]
push esi
call dword [sym.imp.KERNEL32.dll_MapViewOfFileEx]
mov dword [ebp], eax
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp]
test eax, eax
je 0x51ce99
add eax, dword [ebp + 0x10]
mov dword [ebp], eax
mov eax, ebp
add esp, 0x11c
pop ebx
pop ebp
pop esi
pop edi
ret 0x18
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0xc8], eax
mov ecx, 0x78c5a0
mov edx, 0x78c698
cmp eax, dword [ecx]
je 0x51cf30
add ecx, 8
cmp ecx, edx
jne 0x51ceb0
mov eax, 1
mov dword [esp + 0xcc], eax
mov edx, dword [ebp]
test edx, edx
je 0x51cef1
mov eax, dword [ebp + 4]
test eax, eax
jbe 0x51cee0
push eax
push edx
call dword [sym.imp.KERNEL32.dll_FlushViewOfFile]
mov edx, dword [ebp]
sub edx, dword [ebp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [ebp], 0
mov eax, dword [ebp + 0x1c]
cmp eax, 0xffffffff
je 0x51cf07
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp + 0x1c], 0xffffffff
lea ebx, [esp + 0x84]
lea eax, [esp + 0xc8]
push eax
mov ecx, ebx
call fcn.0058f3b0
push 0x8339e0
push ebx
call fcn.0074444a
mov eax, dword [ebp]
jmp 0x51ce84
mov eax, dword [ecx + 4]
jmp 0x51cec0
mov eax, dword [ecx + 4]
jmp 0x51cdac
mov dword [esp + 0xc0], 0
mov dword [esp + 0xc4], 0x12
lea ebx, [esp + 0x2c]
lea eax, [esp + 0xc0]
push eax
mov ecx, ebx
call fcn.0058f3b0
push 0x8339e0
push ebx
call fcn.0074444a
mov ebx, dword [esp + 0x114]
jmp 0x51cd1d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0xb8], eax
mov ecx, 0x78c5a0
mov edx, 0x78c698
cmp eax, dword [ecx]
je 0x51cfce
add ecx, 8
cmp ecx, edx
jne 0x51cf94
mov eax, 1
mov dword [esp + 0xbc], eax
lea ebx, [esp + 0x58]
lea eax, [esp + 0xb8]
push eax
mov ecx, ebx
call fcn.0058f3b0
push 0x8339e0
push ebx
call fcn.0074444a
jmp 0x51ccfd
mov eax, dword [ecx + 4]
jmp 0x51cfa4