Function at 0x516ed0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x83c
mov dword [esp + 0x1c], eax
mov eax, edx
mov dword [esp + 0x82c], ebx
mov dword [esp + 0x830], esi
mov esi, dword [esp + 0x848]
mov dword [esp + 0x834], edi
mov dword [esp + 0x838], ebp
mov dword [esp + 0x18], ecx
call fcn.00516db0
test eax, eax
mov ebx, eax
je 0x517460
lea ebp, [esp + 0x20]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0x800
mov dword [esp], ebp
call sub.msvcrt.dll_fread
cmp eax, 1
je 0x516f88
test esi, esi
mov edi, 0xffffffff
jne 0x5170a0
mov dword [esp], ebx
call sub.msvcrt.dll_fclose
mov ebx, dword [0xbe4658]
test ebx, ebx
je 0x516f63
mov eax, dword [0xbd8c48]
mov dword [esp], eax
call sub.msvcrt.dll__unlink
mov eax, edi
mov ebx, dword [esp + 0x82c]
mov esi, dword [esp + 0x830]
mov edi, dword [esp + 0x834]
mov ebp, dword [esp + 0x838]
add esp, 0x83c
ret
mov edi, 0x9ed39f
mov ecx, 0xd
mov esi, ebp
repe cmpsb byte [esi], byte es:[edi]
jne 0x5170c1
movzx eax, byte [esp + 0xec]
movzx edx, byte [esp + 0xed]
movzx ecx, byte [esp + 0x220]
mov esi, dword [esp + 0x844]
shl eax, 0x18
shl edx, 0x10
or eax, edx
movzx edx, byte [esp + 0xef]
and ecx, 0x30
sar ecx, 4
or eax, edx
movzx edx, byte [esp + 0xee]
shl edx, 8
or eax, edx
movzx edx, byte [esp + 0x221]
and edx, 0xc
sar edx, 2
cmp ecx, 1
sbb ecx, ecx
and ecx, 0xffffffa0
add ecx, 0x240
cmp edx, 2
mov dword [esi], ecx
mov ecx, dword [esp + 0x840]
mov dword [ecx], 0
je 0x517102
cmp edx, 3
je 0x5170e7
cmp edx, 1
setne dl
movzx edx, dl
sub edx, 1
and edx, 0xfffffff0
add edx, 0x2d0
mov dword [ecx], edx
shl eax, 0xb
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.msvcrt.dll_fseek
test eax, eax
jne 0x517074
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 1
mov dword [esp + 4], 0x800
mov dword [esp], ebp
call sub.msvcrt.dll_fread
cmp eax, 1
je 0x517110
mov dword [esp + 8], str.VobSub:_Cant_read_IFO_PGCI_n
mov edi, 0xffffffff
mov dword [esp + 4], 1
mov dword [esp], 0x23
call fcn.0042b9b0
jmp 0x516f44
mov dword [esp + 8], str.VobSub:_Cant_read_IFO_header_n
mov dword [esp + 4], 1
mov dword [esp], 0x23
call fcn.0042b9b0
jmp 0x516f44
mov dword [esp + 8], str.VobSub:_Bad_magic_in_IFO_header_n
mov edi, 0xffffffff
mov dword [esp + 4], 1
mov dword [esp], 0x23
call fcn.0042b9b0
jmp 0x516f44
mov edx, dword [esp + 0x840]
mov ecx, dword [esp + 0x844]
mov dword [edx], 0x160
shr dword [ecx], 1
jmp 0x517034
mov dword [ecx], 0x160
jmp 0x517034
movzx edi, byte [esp + 0x2c]
movzx eax, byte [esp + 0x2d]
shl edi, 0x18
shl eax, 0x10
or edi, eax
movzx eax, byte [esp + 0x2f]
or edi, eax
movzx eax, byte [esp + 0x2e]
shl eax, 8
or edi, eax
lea esi, [edi + 0xa4]
lea edx, [ebp + esi]
movzx eax, byte [edx + 1]
movzx ecx, byte [edx + 2]
movzx edx, byte [edx + 3]
shl eax, 0x10
shl ecx, 8
or eax, ecx
or eax, edx
movzx edx, byte [esp + esi + 0x20]
mov esi, dword [esp + 0x18]
shl edx, 0x18
or eax, edx
mov dword [esi], eax
lea esi, [edi + 0xa8]
lea edx, [ebp + esi]
movzx eax, byte [edx + 1]
movzx ecx, byte [edx + 2]
movzx edx, byte [edx + 3]
shl eax, 0x10
shl ecx, 8
or eax, ecx
or eax, edx
movzx edx, byte [esp + esi + 0x20]
lea esi, [edi + 0xac]
shl edx, 0x18
or eax, edx
mov edx, dword [esp + 0x18]
mov dword [edx + 4], eax
lea edx, [ebp + esi]
movzx eax, byte [edx + 1]
movzx ecx, byte [edx + 2]
movzx edx, byte [edx + 3]
shl eax, 0x10
shl ecx, 8
or eax, ecx
mov ecx, dword [esp + 0x18]
or eax, edx
movzx edx, byte [esp + esi + 0x20]
lea esi, [edi + 0xb0]
shl edx, 0x18
or eax, edx
lea edx, [ebp + esi]
mov dword [ecx + 8], eax
movzx eax, byte [edx + 1]
movzx ecx, byte [edx + 2]
movzx edx, byte [edx + 3]
shl eax, 0x10
shl ecx, 8
or eax, ecx
or eax, edx
movzx edx, byte [esp + esi + 0x20]
mov esi, dword [esp + 0x18]
shl edx, 0x18
or eax, edx
mov dword [esi + 0xc], eax
lea esi, [edi + 0xb4]
lea edx, [ebp + esi]
movzx eax, byte [edx + 1]
movzx ecx, byte [edx + 2]
movzx edx, byte [edx + 3]
shl eax, 0x10
shl ecx, 8
or eax, ecx
or eax, edx
movzx edx, byte [esp + esi + 0x20]
lea esi, [edi + 0xb8]
shl edx, 0x18
or eax, edx
mov edx, dword [esp + 0x18]
mov dword [edx + 0x10], eax
lea edx, [ebp + esi]
movzx eax, byte [edx + 1]
movzx ecx, byte [edx + 2]
movzx edx, byte [edx + 3]
shl eax, 0x10
shl ecx, 8
or eax, ecx
mov ecx, dword [esp + 0x18]
or eax, edx
movzx edx, byte [esp + esi + 0x20]
lea esi, [edi + 0xbc]
shl edx, 0x18
or eax, edx
lea edx, [ebp + esi]
mov dword [ecx + 0x14], eax
movzx eax, byte [edx + 1]
movzx ecx, byte [edx + 2]
movzx edx, byte [edx + 3]
shl eax, 0x10
shl ecx, 8
or eax, ecx
or eax, edx
movzx edx, byte [esp + esi + 0x20]
mov esi, dword [esp + 0x18]
shl edx, 0x18
or eax, edx
mov dword [esi + 0x18], eax
lea esi, [edi + 0xc0]
lea edx, [ebp + esi]
movzx eax, byte [edx + 1]
movzx ecx, byte [edx + 2]
movzx edx, byte [edx + 3]
shl eax, 0x10
shl ecx, 8
or eax, ecx
or eax, edx
movzx edx, byte [esp + esi + 0x20]
lea esi, [edi + 0xc4]
shl edx, 0x18
or eax, edx
mov edx, dword [esp + 0x18]
mov dword [edx + 0x1c], eax
lea edx, [ebp + esi]
movzx eax, byte [edx + 1]
movzx ecx, byte [edx + 2]
movzx edx, byte [edx + 3]
shl eax, 0x10
shl ecx, 8
or eax, ecx
mov ecx, dword [esp + 0x18]
or eax, edx
movzx edx, byte [esp + esi + 0x20]
lea esi, [edi + 0xc8]
shl edx, 0x18
or eax, edx
lea edx, [ebp + esi]
mov dword [ecx + 0x20], eax
movzx eax, byte [edx + 1]
movzx ecx, byte [edx + 2]
movzx edx, byte [edx + 3]
shl eax, 0x10
shl ecx, 8
or eax, ecx
or eax, edx
movzx edx, byte [esp + esi + 0x20]
mov esi, dword [esp + 0x18]
shl edx, 0x18
or eax, edx
mov dword [esi + 0x24], eax
lea esi, [edi + 0xcc]
lea edx, [ebp + esi]
movzx eax, byte [edx + 1]
movzx ecx, byte [edx + 2]
movzx edx, byte [edx + 3]
shl eax, 0x10
shl ecx, 8
or eax, ecx
or eax, edx
movzx edx, byte [esp + esi + 0x20]
lea esi, [edi + 0xd0]
shl edx, 0x18
or eax, edx
mov edx, dword [esp + 0x18]
mov dword [edx + 0x28], eax
lea edx, [ebp + esi]
movzx eax, byte [edx + 1]
movzx ecx, byte [edx + 2]
movzx edx, byte [edx + 3]
shl eax, 0x10
shl ecx, 8
or eax, ecx
mov ecx, dword [esp + 0x18]
or eax, edx
movzx edx, byte [esp + esi + 0x20]
lea esi, [edi + 0xd4]
shl edx, 0x18
or eax, edx
lea edx, [ebp + esi]
mov dword [ecx + 0x2c], eax
movzx eax, byte [edx + 1]
movzx ecx, byte [edx + 2]
movzx edx, byte [edx + 3]
shl eax, 0x10
shl ecx, 8
or eax, ecx
or eax, edx
movzx edx, byte [esp + esi + 0x20]
mov esi, dword [esp + 0x18]
shl edx, 0x18
or eax, edx
mov dword [esi + 0x30], eax
lea esi, [edi + 0xd8]
lea edx, [ebp + esi]
movzx eax, byte [edx + 1]
movzx ecx, byte [edx + 2]
movzx edx, byte [edx + 3]
shl eax, 0x10
shl ecx, 8
or eax, ecx
or eax, edx
movzx edx, byte [esp + esi + 0x20]
lea esi, [edi + 0xdc]
add edi, 0xe0
shl edx, 0x18
or eax, edx
mov edx, dword [esp + 0x18]
mov dword [edx + 0x34], eax
lea edx, [ebp + esi]
add ebp, edi
movzx eax, byte [edx + 1]
movzx ecx, byte [edx + 2]
movzx edx, byte [edx + 3]
shl eax, 0x10
shl ecx, 8
or eax, ecx
mov ecx, dword [esp + 0x18]
or eax, edx
movzx edx, byte [esp + esi + 0x20]
mov esi, dword [esp + 0x1c]
shl edx, 0x18
or eax, edx
mov dword [ecx + 0x38], eax
movzx eax, byte [ebp + 1]
movzx edx, byte [ebp + 2]
shl eax, 0x10
shl edx, 8
or eax, edx
movzx edx, byte [ebp + 3]
or eax, edx
movzx edx, byte [esp + edi + 0x20]
xor edi, edi
shl edx, 0x18
or eax, edx
test esi, esi
mov dword [ecx + 0x3c], eax
je 0x516f44
mov esi, dword [esp + 0x1c]
mov dword [esi + 0x44], 1
jmp 0x516f44
test esi, esi
jne 0x51746e
mov edi, 0xffffffff
jmp 0x516f63
mov dword [esp + 8], str.VobSub:_Cant_open_IFO_file_n
or edi, 0xffffffff
mov dword [esp + 4], 2
mov dword [esp], 0x23
call fcn.0042b9b0
jmp 0x516f63