Function at 0x40e7f0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53f4fe
mov eax, dword fs:[0]
push eax
sub esp, 0x198
mov eax, dword [0x58f660]
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 dword [ebp - 0x10], esp
push 0x103
xor esi, esi
lea eax, [ebp - 0x117]
mov ebx, ecx
push esi
push eax
mov dword [ebp - 0x1a4], ebx
mov byte [ebp - 0x118], 0
call fcn.00518380
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x118]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x5c
lea edx, [ebp - 0x174]
push esi
push edx
mov dword [ebp - 0x190], esi
mov dword [ebp - 0x17c], esi
call fcn.00518380
add esp, 0xc
push esi
push 0x80
push 3
push esi
push 1
push SysReAllocString
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40e8c8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Cant_open_image_file._Error_d_n
push 0x597db8
call fcn.00515b45
add esp, 0xc
mov byte [ebx + 0x7c], 1
mov dword [ebx + 0x80], 0x597db8
jmp 0x40ec2b
lea ecx, [ebp - 0x190]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edx, dword [ebp - 0x190]
xor ecx, ecx
xor edi, edi
or ecx, eax
or edx, edi
or ecx, edx
jne 0x40e8f9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Get_file_size_failed._Error_d_n
jmp 0x40ec09
push 2
lea edx, [ebp - 0x184]
push edx
push 0xfffffe00
push esi
mov dword [ebp - 0x188], 0xfffffe00
mov dword [ebp - 0x184], 0xffffffff
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x188], eax
call edi
mov ecx, dword [ebp - 0x188]
or edx, 0xffffffff
cmp ecx, edx
jne 0x40e94d
test eax, eax
je 0x40e998
mov dword [ebp - 0x188], edx
mov dword [ebp - 0x184], edx
push 0
lea eax, [ebp - 0x17c]
push eax
push 0x5c
lea ecx, [ebp - 0x174]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40ec01
cmp dword [ebp - 0x17c], 0
je 0x40ec01
mov edx, 0x7cef
cmp dx, word [ebp - 0x172]
je 0x40e9b2
mov dword [ebx + 0x80], str.The_magic_number_of_metadata_does_not_match._n
jmp 0x40ec20
cmp ecx, edx
jne 0x40e94d
cmp dword [ebp - 0x184], 0
jne 0x40e94d
call edi
push eax
push str.Seek_to_metadata_failed._Error_d_n_n
jmp 0x40ec09
mov eax, dword [ebp - 0x170]
cdq
shld edx, eax, 9
push edx
shl eax, 9
push eax
push esi
xor edx, edx
call fcn.0040e410
add esp, 0xc
cmp eax, 0xffffffff
jne 0x40e9e3
test edx, edx
jne 0x40e9e3
call edi
push eax
push str.Seek_to_profile_failed._Error_d_n_n
jmp 0x40ec09
mov eax, dword [ebp - 0x16c]
shl eax, 9
push eax
call fcn.0041f6c2
mov edx, dword [ebp - 0x16c]
add esp, 4
push 0
lea ecx, [ebp - 0x17c]
push ecx
shl edx, 9
push edx
push eax
push esi
mov dword [ebp - 0x180], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40ebd0
cmp dword [ebp - 0x17c], 0
je 0x40ebd0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.0040b790
push 0x48
call fcn.0041f693
add esp, 4
mov dword [ebp - 0x194], eax
xor edi, edi
mov dword [ebp - 4], edi
cmp eax, edi
je 0x40ea61
push eax
call fcn.00413970
mov edi, eax
mov dword [ebp - 0x18c], eax
jmp 0x40ea67
mov dword [ebp - 0x18c], edi
mov esi, dword [ebp - 0x180]
push 0
mov dword [ebp - 4], 1
mov eax, dword [edi]
mov edx, dword [eax + 8]
push 0
push esi
mov ecx, edi
call edx
test eax, eax
jne 0x40eaac
mov byte [ebx + 0x7c], 1
mov dword [ebx + 0x80], str.Load_program_file_failed.
mov eax, dword [edi]
mov edx, dword [eax]
push 1
mov ecx, edi
call edx
push esi
call fcn.0041f6cd
add esp, 4
jmp 0x40ec2b
mov eax, edi
call fcn.0040b010
mov ecx, str.BasicInfo
mov esi, eax
call fcn.004130a0
mov dword [ebp - 0x19c], eax
mov ecx, 0x56d4e4
mov eax, esi
call fcn.004130a0
mov dword [ebp - 0x1a0], eax
mov ecx, 0x56d4ec
mov eax, esi
call fcn.004130a0
mov dword [ebp - 0x198], eax
mov ecx, str.Data
mov eax, esi
call fcn.004130a0
mov dword [ebp - 0x194], eax
mov eax, dword [ebp - 0x19c]
push eax
call fcn.0040c060
lea esi, [ebx + 0x138]
call fcn.0040f1f0
mov ecx, dword [ebp - 0x198]
push ecx
mov ecx, ebx
call fcn.0040d320
lea esi, [ebx + 0x148]
call fcn.0040f1f0
mov edx, dword [ebp - 0x1a0]
push edx
mov ecx, ebx
call fcn.0040d9e0
lea esi, [ebx + 0xe8]
call fcn.0040f1f0
mov eax, dword [ebp - 0x194]
push eax
push ebx
call fcn.0040c300
test al, al
je 0x40ec2b
push ebx
lea edx, [ebp - 0x168]
call fcn.004042d0
add ebx, 0x1c
push ebx
lea edx, [ebp - 0x158]
call fcn.004042d0
mov bl, 1
mov dword [ebp - 4], 0xffffffff
jmp 0x40ebb3
mov edx, dword [edi]
mov eax, dword [edx]
push 1
mov ecx, edi
call eax
mov ecx, dword [ebp - 0x180]
push ecx
call fcn.0041f6cd
add esp, 4
mov al, bl
jmp 0x40ec2d
call edi
push eax
push str.Read_profile_failed._Error_d_n_n
push 0x597db8
call fcn.00515b45
mov edx, dword [ebp - 0x180]
push edx
mov byte [ebx + 0x7c], 1
mov dword [ebx + 0x80], 0x597db8
call fcn.0041f6cd
add esp, 0x10
jmp 0x40ec24
call edi
push eax
push str.Read_metadata_failed._Error_d_n_n
push 0x597db8
call fcn.00515b45
mov dword [ebx + 0x80], 0x597db8
add esp, 0xc
mov byte [ebx + 0x7c], 1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
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.00514194
mov esp, ebp
pop ebp
ret