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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x54011a
push eax
mov eax, dword [esp + 0x10]
mov dword fs:[0], esp
sub esp, 0x160
mov dword [eax], 0
push ebx
push ebp
mov ebp, ecx
push esi
push edi
cmp dword [ebp + 0x110], 1
je 0x46f5b9
mov eax, dword [ebp + 0x100]
mov esi, dword [ebp + 0x1d8]
mov edi, dword [ebp + 0x1dc]
test eax, eax
jne 0x46ef93
test edi, edi
jg 0x46ef8a
jl 0x46ef68
test esi, esi
ja 0x46ef74
mov esi, dword [ebp + 0x228]
mov edi, dword [ebp + 0x22c]
test edi, edi
jg 0x46ef8a
jl 0x46f5b9
cmp esi, 0x80000
jbe 0x46f5b9
push edi
push esi
mov ecx, ebp
call fcn.0046e9f0
test edi, edi
jg 0x46efad
jl 0x46efa1
cmp esi, 0x80000
ja 0x46efad
mov ecx, ebp
call fcn.0046e9a0
jmp 0x46f5b9
mov eax, dword [ebp + 0x100]
test eax, eax
je 0x46f5b9
lea ecx, [esp + 0x64]
call fcn.00401000
lea ecx, [esp + 0x1c]
mov dword [esp + 0x178], 0
push ecx
mov ecx, ebp
call fcn.00465200
mov edx, dword [esp + 0x1c]
push 0
push 0x80
push 3
push 0
push 0
push SysReAllocStringLen
push edx
mov byte [esp + 0x194], 1
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [esp + 0x34], ebx
je 0x46f594
lea eax, [esp + 0x50]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [esp + 0x4c], eax
jne 0x46f03e
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x46f03a
mov ecx, ebp
call fcn.0046e9a0
jmp 0x46f594
mov eax, dword [esp + 0x4c]
cmp eax, esi
jne 0x46f04a
mov ecx, dword [esp + 0x50]
cmp ecx, edi
je 0x46f056
mov ecx, ebp
call fcn.0046e9a0
jmp 0x46f594
push 0
push 0
push 0
push 2
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov edi, eax
test edi, edi
mov dword [esp + 0x28], edi
je 0x46f58d
lea edx, [esp + 0xe0]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [esp + 0xfc]
mov esi, dword [ebp + 0xf8]
shl eax, 8
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 0x100]
dec eax
shl eax, 4
push eax
call fcn.0050d138
add esp, 4
mov ecx, eax
test esi, esi
mov dword [esp + 0x10], ecx
je 0x46f579
mov eax, dword [esi]
mov dword [esp + 0x18], 0
test eax, eax
je 0x46f2c5
mov dword [esp + 0x24], ecx
jmp 0x46f0d4
mov eax, dword [esp + 0x14]
mov esi, dword [eax + 8]
mov ecx, dword [eax]
test esi, esi
mov dword [esp + 0x14], ecx
je 0x46f2c5
cmp dword [esi], 0
jne 0x46f288
push 0
lea ecx, [esp + 0x68]
call fcn.00401ab0
mov ebx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edx, dword [esi + 8]
xor ecx, ecx
mov edi, dword [esi + 0xc]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], ecx
push ecx
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x58], eax
push ecx
push ebx
push eax
mov dword [esp + 0x68], ebx
mov dword [esp + 0x50], edx
call fcn.004eddc0
test eax, eax
jbe 0x46f1a3
mov dword [esp + 0x38], eax
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x40]
push edx
mov edx, dword [esp + 0x2c]
push eax
mov ecx, edi
push edi
push 4
sar ecx, 0x1f
push edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebx, eax
test ebx, ebx
je 0x46f16b
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x64]
push eax
push ebx
push 0
call fcn.00401b00
push ebx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x2c]
add eax, ecx
mov dword [esp + 0x40], eax
mov eax, 0
adc edi, eax
add edx, ecx
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x2c], edx
adc ecx, eax
mov eax, dword [esp + 0x38]
dec eax
mov dword [esp + 0x30], ecx
mov dword [esp + 0x38], eax
jne 0x46f130
mov ebx, dword [esp + 0x58]
mov edx, dword [esp + 0x54]
mov ecx, dword [esp + 0x2c]
mov eax, edx
sub eax, ecx
sbb ebx, dword [esp + 0x30]
mov dword [esp + 0x3c], ebx
js 0x46f1f6
jg 0x46f1bf
test eax, eax
jbe 0x46f1f6
mov eax, dword [esp + 0x28]
mov ebx, edx
sub ebx, ecx
mov ecx, dword [esp + 0x40]
push ebx
push ecx
mov edx, edi
push edi
push 4
push eax
sar edx, 0x1f
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
test edi, edi
je 0x46f1f6
push ebx
push edi
push 0
lea ecx, [esp + 0x70]
call fcn.00401b00
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
lea edi, [esi + 0x18]
push 0
push edi
lea ecx, [esp + 0x6c]
call fcn.00401bb0
mov edx, dword [esp + 0x24]
mov ecx, edi
mov eax, dword [ecx]
mov dword [edx], eax
mov eax, dword [ecx + 4]
mov dword [edx + 4], eax
mov eax, dword [ecx + 8]
mov dword [edx + 8], eax
mov ecx, dword [ecx + 0xc]
mov dword [edx + 0xc], ecx
mov edx, dword [esp + 0x18]
push edx
push edi
mov ecx, ebp
mov dword [esi], 1
mov dword [esi + 0x28], 1
call fcn.0046f710
test eax, eax
jne 0x46f265
mov edi, dword [esi + 0x10]
mov ecx, dword [esi + 0xc]
mov ebx, dword [esi + 0x14]
mov dword [esi + 0x28], eax
mov eax, dword [esi + 8]
push 0
mov edx, eax
add edx, edi
mov edi, ecx
adc edi, ebx
push edi
push edx
push ecx
push eax
mov ecx, ebp
call fcn.0046f850
jmp 0x46f2a5
mov eax, dword [esi + 8]
mov edi, dword [esi + 0x10]
mov ecx, dword [esi + 0xc]
mov ebx, dword [esi + 0x14]
mov edx, eax
push 1
add edx, edi
mov edi, ecx
adc edi, ebx
push edi
push edx
push ecx
push eax
mov ecx, ebp
call fcn.0046f850
jmp 0x46f2a5
mov eax, dword [esp + 0x24]
add esi, 0x18
mov ecx, dword [esi]
mov dword [eax], ecx
mov edx, dword [esi + 4]
mov dword [eax + 4], edx
mov ecx, dword [esi + 8]
mov dword [eax + 8], ecx
mov edx, dword [esi + 0xc]
mov dword [eax + 0xc], edx
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x14]
inc edx
add ecx, 0x10
mov dword [esp + 0x18], edx
test eax, eax
mov dword [esp + 0x24], ecx
jne 0x46f0d0
mov eax, dword [ebp + 0xf8]
test eax, eax
je 0x46f4d1
mov ebx, dword [eax + 8]
test ebx, ebx
mov dword [esp + 0x38], ebx
je 0x46f4d1
push 0
lea ecx, [esp + 0x68]
call fcn.00401ab0
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
shl esi, 4
push esi
push eax
push 0
lea ecx, [esp + 0x70]
call fcn.00401b00
add ebx, 0x14
push 0
push ebx
lea ecx, [esp + 0x6c]
call fcn.00401bb0
mov ecx, dword [esp + 0x10]
lea edi, [ebp + 0x44]
mov edx, edi
push 0x60
mov eax, dword [ecx]
mov dword [edx], eax
mov eax, dword [ecx + 4]
mov dword [edx + 4], eax
mov eax, dword [ecx + 8]
mov dword [edx + 8], eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [ecx + 0xc]
mov dword [edx + 0xc], ecx
mov ecx, dword [esp + 0x14]
cdq
sub eax, edx
lea edx, [ebp + 0x54]
sar eax, 1
shl eax, 4
add eax, ecx
mov ecx, dword [eax]
mov dword [edx], ecx
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
mov ecx, dword [eax + 8]
mov dword [edx + 8], ecx
mov ecx, dword [esp + 0x14]
mov eax, dword [eax + 0xc]
mov dword [edx + 0xc], eax
lea edx, [esi + ecx - 0x10]
lea eax, [ebp + 0x64]
mov ecx, dword [edx]
mov dword [eax], ecx
mov ecx, dword [edx + 4]
mov dword [eax + 4], ecx
mov ecx, dword [edx + 8]
mov dword [eax + 8], ecx
mov ecx, ebp
mov edx, dword [edx + 0xc]
mov dword [eax + 0xc], edx
lea eax, [ebp + 0x74]
push eax
push 0x30
push edi
call fcn.0047adf0
push esi
mov esi, dword [esp + 0x14]
lea ecx, [esp + 0x18]
push esi
push ecx
call fcn.0046ee30
add esp, 0xc
push eax
lea ecx, [ebp + 0xe4]
mov byte [esp + 0x17c], 2
call fcn.0050d536
lea ecx, [esp + 0x14]
mov byte [esp + 0x178], 1
call fcn.0050d3fd
lea ecx, [esp + 0x104]
call fcn.00401000
mov byte [esp + 0x178], 3
push 0
lea ecx, [esp + 0x68]
call fcn.00401ab0
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x64]
lea edx, [eax + eax*2]
push edx
push edi
push 0
call fcn.00401b00
lea eax, [esp + 0x54]
push 0
push eax
lea ecx, [esp + 0x6c]
call fcn.00401bb0
lea ecx, [esp + 0x54]
push 0x10
lea edx, [esp + 0x18]
push ecx
push edx
call fcn.0046ee30
add esp, 0xc
push eax
lea ecx, [ebp + 0xe8]
mov byte [esp + 0x17c], 4
call fcn.0050d536
lea ecx, [esp + 0x14]
mov byte [esp + 0x178], 3
call fcn.0050d3fd
mov eax, dword [esp + 0x38]
push 0xffffffffffffffff
push ebx
mov ecx, ebp
mov dword [eax], 1
call fcn.0046f710
test eax, eax
jne 0x46f4bd
test esi, esi
je 0x46f468
push esi
call fcn.0050d161
add esp, 4
mov ecx, dword [esp + 0x28]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
mov edx, dword [esp + 0x34]
push edx
call esi
lea ecx, [esp + 0x104]
mov byte [esp + 0x178], 1
call fcn.00401060
lea ecx, [esp + 0x1c]
mov byte [esp + 0x178], 0
call fcn.0050d3fd
lea ecx, [esp + 0x64]
mov dword [esp + 0x178], 0xffffffff
call fcn.00401060
or eax, 0xffffffff
jmp 0x46f5be
lea ecx, [esp + 0x104]
mov byte [esp + 0x178], 1
call fcn.00401060
lea ecx, [esp + 0xd0]
call fcn.0050dff1
mov eax, dword [0x591288]
mov dword [esp + 0x48], eax
mov eax, dword [ebp + 0xf8]
mov byte [esp + 0x178], 6
test eax, eax
je 0x46f548
mov edi, dword [eax + 8]
mov esi, dword [eax]
test edi, edi
je 0x46f548
cmp dword [edi], 0
jne 0x46f50d
mov ecx, ebp
call fcn.0046e9a0
test esi, esi
je 0x46f52a
mov eax, esi
mov esi, dword [esi]
mov eax, dword [eax + 8]
cmp dword [eax], 0
je 0x46f523
test esi, esi
jne 0x46f511
jmp 0x46f52a
mov ecx, ebp
call fcn.0046e9a0
mov eax, dword [ebp + 0x100]
test eax, eax
je 0x46f548
mov ecx, dword [esp + 0x180]
mov dword [edi + 0x28], 1
mov dword [ecx], 1
lea ecx, [esp + 0x48]
mov byte [esp + 0x178], 5
call fcn.0050d3fd
lea ecx, [esp + 0xd0]
mov byte [esp + 0x178], 1
call fcn.0050e0e6
mov ebx, dword [esp + 0x34]
mov edi, dword [esp + 0x28]
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x46f586
push ecx
call fcn.0050d161
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x1c]
mov byte [esp + 0x178], 0
call fcn.0050d3fd
lea ecx, [esp + 0x64]
mov dword [esp + 0x178], 0xffffffff
call fcn.00401060
mov eax, 0xfffffffe
mov ecx, dword [esp + 0x170]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x16c
ret 4