Function at 0x40ed70
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4af3c5
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x500ef0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x30], esi
mov eax, dword [ebp + 8]
xor ecx, ecx
mov word [ebp - 0x28], cx
lea ecx, [ebp - 0x28]
push eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
call fcn.0040a170
lea ebx, [esi + 0x10]
mov dword [ebp - 4], 0
push ebx
lea ecx, [ebp - 0x28]
call fcn.0040b730
test eax, eax
je 0x40edf1
mov ecx, esi
call fcn.0040f100
lea eax, [ebp - 0x28]
cmp ebx, eax
je 0x40edf1
push 0xffffffffffffffff
push 0
push eax
mov ecx, ebx
call fcn.0040a2e0
xor edi, edi
cmp byte [esi + 0x2c], 0
jne 0x40f08d
cmp dword [esi + 0x20], edi
jne 0x40ee21
push str.Invalid_Package_FileName__FileName_must_not_be_empty_string
push 2
call fcn.0040bbb0
push eax
call fcn.0040bac0
add esp, 0xc
mov edi, 2
jmp 0x40f08d
mov byte [ebp - 4], 1
cmp dword [ebx + 0x14], 8
jb 0x40ee2f
mov eax, dword [ebx]
jmp 0x40ee31
mov eax, ebx
push 0x4d7574
push eax
call fcn.004889c7
mov esi, eax
add esp, 8
mov dword [ebp - 0x34], esi
test esi, esi
jne 0x40ee70
cmp dword [ebx + 0x14], 8
jb 0x40ee50
mov ebx, dword [ebx]
push ebx
push str.package_file__s_cant_be_opened
push 2
call fcn.0040bbb0
push eax
call fcn.0040bac0
add esp, 0x10
mov edi, 4
jmp 0x40f08d
push esi
call fcn.004898df
push 0
push 0
push esi
mov ebx, eax
call fcn.00489184
push esi
call fcn.004898df
push 2
push 0
push esi
mov edi, eax
call fcn.00489184
push esi
call fcn.004898df
push 0
sub eax, edi
push ebx
push esi
mov dword [ebp - 0x2c], eax
call fcn.00489184
mov edi, dword [ebp - 0x2c]
add esp, 0x30
cmp edi, 0x6400000
jbe 0x40ef28
push esi
call fcn.004898df
push 0
push 0
push esi
mov ebx, eax
call fcn.00489184
push esi
call fcn.004898df
push 2
push 0
push esi
mov edi, eax
call fcn.00489184
push esi
call fcn.004898df
push 0
sub eax, edi
push ebx
push esi
mov dword [ebp - 0x2c], eax
call fcn.00489184
mov ecx, dword [ebp - 0x30]
add esp, 0x30
add ecx, 0x10
cmp dword [ecx + 0x14], 8
jb 0x40eeff
mov ecx, dword [ecx]
push dword [ebp - 0x2c]
push ecx
push str.total_size_of__s_is__d__its_too_large_to_patch
push 2
call fcn.0040bbb0
push eax
call fcn.0040bac0
push esi
call fcn.00488b1a
add esp, 0x18
mov edi, 8
jmp 0x40f08d
push edi
call fcn.0047fec0
mov ebx, dword [ebp - 0x30]
add esp, 4
mov dword [ebx + 8], eax
test eax, eax
jne 0x40ef61
push edi
push str.Malloc_memory_for_read_package_failed__the_malloc_size_is__d
push 2
call fcn.0040bbb0
push eax
call fcn.0040bac0
push esi
call fcn.00488b1a
add esp, 0x14
mov edi, 1
jmp 0x40f08d
push esi
push edi
push 1
push eax
mov dword [ebx + 0xc], edi
call fcn.00488d1e
add esp, 0x10
mov dword [ebp - 0x2c], eax
cmp eax, edi
je 0x40ef9a
push esi
call fcn.004a0826
add esp, 4
test eax, eax
jne 0x40ef97
push esi
call fcn.00488b1a
xor esi, esi
add esp, 4
mov dword [ebp - 0x34], esi
xor eax, eax
jmp 0x40ef9a
mov eax, dword [ebp - 0x2c]
cmp eax, dword [ebx + 0xc]
je 0x40efde
mov ecx, ebx
call fcn.0040f100
cmp dword [ebx + 0x24], 8
lea ecx, [ebx + 0x10]
jb 0x40efb1
mov ecx, dword [ecx]
push ecx
push str.Read_package__s_failed
push 2
call fcn.0040bbb0
push eax
call fcn.0040bac0
add esp, 0x10
test esi, esi
je 0x40efd4
push esi
call fcn.00488b1a
add esp, 4
mov edi, 6
jmp 0x40f08d
test esi, esi
je 0x40eff0
push esi
call fcn.00488b1a
add esp, 4
xor esi, esi
mov dword [ebp - 0x34], esi
mov ecx, dword [ebx + 0xc]
mov eax, dword [ebx + 8]
cmp ecx, 0xae
ja 0x40f005
mov edi, 9
jmp 0x40f079
mov edx, dword [eax]
cmp edx, dword [str.PKT1]
je 0x40f038
cmp dword [ebx + 0x24], 8
lea ecx, [ebx + 0x10]
jb 0x40f01a
mov ecx, dword [ecx]
push edx
push ecx
push str._s_is_not_a_diff_package_file__fourcc_mismatched__target_fourcc_is__d
push 2
call fcn.0040bbb0
push eax
call fcn.0040bac0
add esp, 0x14
mov edi, 9
jmp 0x40f079
mov edx, dword [eax + 4]
cmp edx, 3
jbe 0x40f069
cmp dword [ebx + 0x24], 8
lea ecx, [ebx + 0x10]
jb 0x40f04b
mov ecx, dword [ecx]
push edx
push ecx
push str.The_version_of__s_is__d__which_is_a_unsupported_package_version
push 2
call fcn.0040bbb0
push eax
call fcn.0040bac0
add esp, 0x14
mov edi, 0xa
jmp 0x40f079
push ecx
push eax
push eax
mov ecx, ebx
call fcn.0040f300
mov edi, eax
test edi, edi
je 0x40f080
mov ecx, ebx
call fcn.0040f100
test esi, esi
je 0x40f08d
push esi
call fcn.00488b1a
add esp, 4
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x40f0cc
mov edx, dword [ebp - 0x28]
inc eax
mov ecx, edx
cmp eax, 0x7fffffff
ja 0x40f0ec
add eax, eax
cmp eax, 0x1000
jb 0x40f0c3
test cl, 0x1f
jne 0x40f0ec
mov edx, dword [ecx - 4]
cmp edx, ecx
jae 0x40f0ec
sub ecx, edx
cmp ecx, 4
jb 0x40f0ec
cmp ecx, 0x23
ja 0x40f0ec
push edx
call fcn.0041211c
add esp, 4
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0047a65d
mov esp, ebp
pop ebp
ret 4
call fcn.0047f6df
int3