Function at 0x50dcd0
Capabilities:
Read file on windows

Disassembly:
mov al, byte [0x5e08a4]
sub esp, 8
test al, al
push ebx
push ebp
push esi
push edi
mov esi, ecx
je 0x50dcf4
push 0x100000
call fcn.0050dc70
test al, al
je 0x50dfda
mov ebp, dword [esp + 0x20]
xor ebx, ebx
mov eax, ebp
sub eax, ebx
je 0x50ddc7
dec eax
je 0x50dd2f
mov eax, dword [0x5e079c]
cmp eax, ebx
je 0x50dfda
push ebp
push str.AFilePackage::Open____Unknown_open_mode___d__
push eax
call fcn.00510990
add esp, 0xc
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 8
mov edi, dword [esp + 0x1c]
push 0x5d3468
push edi
mov byte [esi + 1], 0
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
cmp eax, ebx
mov dword [esi + 0x118], eax
jne 0x50dd78
mov eax, dword [0x5e079c]
cmp eax, ebx
je 0x50dfda
push edi
push str.AFilePackage::Open____Can_not_create_file___s_
push eax
call fcn.00510990
add esp, 0xc
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 8
lea edx, [esi + 4]
mov ecx, 0x42
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
push 0x100
lea eax, [esi + 0xc]
push str.Angelica_File_Package__Beijing_E_Pie_Entertainment_Corporation_20022008._All_Rights_Reserved.
push eax
mov dword [esi + 8], ebx
mov dword [edx], 0x10003
call dword [sym.imp.MSVCRT.dll_strncpy]
add esp, 0xc
mov dword [esi + 0x110], ebx
mov dword [esi + 0x114], ebx
mov dword [esi + 0x10c], ebp
mov byte [esi], 0
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 8
ret 8
mov edi, dword [esp + 0x1c]
mov ebp, dword [sym.imp.MSVCRT.dll_fopen]
push 0x5d33d4
push edi
mov byte [esi + 1], 0
call ebp
add esp, 8
cmp eax, ebx
mov dword [esi + 0x118], eax
jne 0x50de2b
push 0x5ceba0
push edi
call ebp
add esp, 8
cmp eax, ebx
mov dword [esi + 0x118], eax
jne 0x50de27
mov eax, dword [0x5e079c]
cmp eax, ebx
je 0x50dfda
push edi
push str.AFilePackage::Open____Can_not_open_file___s_
push eax
call fcn.00510990
add esp, 0xc
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 8
mov byte [esi + 1], 1
mov ecx, dword [esi + 0x118]
mov ebp, dword [sym.imp.MSVCRT.dll_fseek]
push 2
push 0xfffffffffffffffc
push ecx
call ebp
mov edx, dword [esi + 0x118]
mov edi, dword [sym.imp.MSVCRT.dll_fread]
push edx
push 1
lea eax, [esp + 0x24]
push 4
push eax
call edi
mov eax, dword [esp + 0x2c]
add esp, 0x1c
cmp eax, 0x10003
jne 0x50dfc3
mov ecx, dword [esi + 0x118]
push 2
push 0xfffffffffffffff8
push ecx
call ebp
mov edx, dword [esi + 0x118]
lea ebx, [esi + 0x110]
push edx
push 1
push 4
push ebx
call edi
mov eax, dword [esi + 0x118]
push 2
push 0xfffffef0
push eax
call ebp
mov ecx, dword [esi + 0x118]
lea edx, [esi + 4]
push ecx
push 1
push 0x108
push edx
call edi
mov eax, dword [ebx]
mov ecx, eax
shl ecx, 4
add ecx, eax
shl ecx, 4
push ecx
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 0x3c
mov dword [esi + 0x114], eax
test eax, eax
jne 0x50dee4
mov eax, dword [0x5e079c]
test eax, eax
je 0x50dfda
push str.AFilePackage::Open____Not_enough_memory_
jmp 0x50dfd1
mov edx, dword [esi + 8]
mov eax, dword [esi + 0x118]
push 0
push edx
push eax
call ebp
mov eax, dword [ebx]
xor ebp, ebp
add esp, 0xc
cmp eax, ebp
mov dword [esp + 0x1c], ebp
jle 0x50dfa3
mov ecx, dword [esi + 0x118]
lea edx, [esp + 0x14]
push ecx
push 1
push 4
push edx
call edi
mov eax, dword [esi + 0x118]
mov ecx, dword [esp + 0x24]
push eax
push 1
push ecx
mov ecx, dword [esi + 0x114]
mov edx, ebp
add edx, ecx
push edx
call edi
mov eax, dword [esi + 0x118]
mov ecx, dword [esi + 0x114]
push eax
push 1
lea edx, [ecx + ebp + 0x104]
push 4
push edx
call edi
mov eax, dword [esi + 0x118]
mov ecx, dword [esi + 0x114]
push eax
push 1
lea edx, [ecx + ebp + 0x108]
push 4
push edx
call edi
mov eax, dword [esi + 0x118]
mov ecx, dword [esi + 0x114]
add esp, 0x40
lea edx, [ecx + ebp + 0x10c]
push eax
push 1
push 4
push edx
call edi
mov eax, dword [esp + 0x2c]
mov ecx, dword [ebx]
add esp, 0x10
inc eax
add ebp, 0x110
cmp eax, ecx
mov dword [esp + 0x1c], eax
jl 0x50df06
mov ecx, esi
call fcn.0050eb10
mov ebp, dword [esp + 0x20]
mov byte [esi], 0
mov dword [esi + 0x10c], ebp
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 8
ret 8
mov eax, dword [0x5e079c]
cmp eax, ebx
je 0x50dfda
push str.AFilePackage::Open____Incorrect_version_
push eax
call fcn.00510990
add esp, 8
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 8
ret 8