Function at 0x5176d0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x82c
mov eax, dword [esp + 0x834]
mov dword [esp + 0x81c], ebx
mov dword [esp + 0x820], esi
mov esi, dword [esp + 0x844]
mov dword [esp + 0x824], edi
mov dword [esp + 0x828], ebp
call fcn.00516db0
test eax, eax
mov ebx, eax
je 0x517ce3
lea ebp, [esp + 0x10]
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 0x517785
test esi, esi
mov edi, 0xffffffff
jne 0x5178b1
mov dword [esp], ebx
call sub.msvcrt.dll_fclose
mov ebp, dword [0xbe4658]
test ebp, ebp
je 0x517760
mov eax, dword [0xbd8c48]
mov dword [esp], eax
call sub.msvcrt.dll__unlink
mov eax, edi
mov ebx, dword [esp + 0x81c]
mov esi, dword [esp + 0x820]
mov edi, dword [esp + 0x824]
mov ebp, dword [esp + 0x828]
add esp, 0x82c
ret
mov edi, 0x9ed39f
mov ecx, 0xd
mov esi, ebp
repe cmpsb byte [esi], byte es:[edi]
jne 0x5178d2
movzx eax, byte [esp + 0xdc]
movzx edx, byte [esp + 0xdd]
movzx ecx, byte [esp + 0x210]
mov esi, dword [esp + 0x840]
shl eax, 0x18
shl edx, 0x10
or eax, edx
movzx edx, byte [esp + 0xdf]
and ecx, 0x30
sar ecx, 4
or eax, edx
movzx edx, byte [esp + 0xde]
shl edx, 8
or eax, edx
movzx edx, byte [esp + 0x211]
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 + 0x83c]
mov dword [ecx], 0
je 0x517951
cmp edx, 3
je 0x517936
cmp edx, 1
setne dl
movzx edx, dl
sub edx, 1
and edx, 0xfffffff0
add edx, 0x2d0
mov dword [ecx], edx
mov ecx, dword [esp + 0x84c]
test ecx, ecx
je 0x51784b
mov edx, dword [esp + 0x848]
test edx, edx
jns 0x5178f8
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 0x51788b
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 0x517960
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 0x517741
mov dword [esp + 8], str.VobSub:_Cant_read_IFO_header_n
mov dword [esp + 4], 1
mov dword [esp], 0x23
call fcn.0042b9b0
jmp 0x517741
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 0x517741
cmp dword [esp + 0x848], 0x1f
jg 0x51784b
mov esi, dword [esp + 0x848]
lea edx, [esi + esi*2]
mov esi, dword [esp + 0x84c]
lea edx, [edx + edx + 0x258]
movzx ecx, byte [esp + edx + 0x10]
mov byte [esi], cl
movzx edx, byte [esp + edx + 0x11]
mov byte [esi + 2], 0
mov byte [esi + 1], dl
jmp 0x51784b
mov edx, dword [esp + 0x83c]
mov ecx, dword [esp + 0x840]
mov dword [edx], 0x160
shr dword [ecx], 1
jmp 0x517831
mov dword [ecx], 0x160
jmp 0x517831
movzx eax, byte [esp + 0x1c]
movzx edx, byte [esp + 0x1d]
shl eax, 0x18
shl edx, 0x10
or eax, edx
movzx edx, byte [esp + 0x1f]
or eax, edx
movzx edx, byte [esp + 0x1e]
shl edx, 8
or eax, edx
lea edi, [eax + 0xa4]
lea ecx, [ebp + edi]
movzx edx, byte [ecx + 1]
movzx esi, byte [ecx + 2]
movzx ecx, byte [ecx + 3]
shl edx, 0x10
shl esi, 8
or edx, esi
or edx, ecx
movzx ecx, byte [esp + edi + 0x10]
lea edi, [eax + 0xa8]
shl ecx, 0x18
or edx, ecx
mov ecx, dword [esp + 0x838]
mov dword [ecx], edx
lea ecx, [ebp + edi]
movzx edx, byte [ecx + 1]
movzx esi, byte [ecx + 2]
movzx ecx, byte [ecx + 3]
shl edx, 0x10
shl esi, 8
or edx, esi
mov esi, dword [esp + 0x838]
or edx, ecx
movzx ecx, byte [esp + edi + 0x10]
lea edi, [eax + 0xac]
shl ecx, 0x18
or edx, ecx
lea ecx, [ebp + edi]
mov dword [esi + 4], edx
movzx edx, byte [ecx + 1]
movzx esi, byte [ecx + 2]
movzx ecx, byte [ecx + 3]
shl edx, 0x10
shl esi, 8
or edx, esi
or edx, ecx
movzx ecx, byte [esp + edi + 0x10]
lea edi, [eax + 0xb0]
shl ecx, 0x18
or edx, ecx
mov ecx, dword [esp + 0x838]
mov dword [ecx + 8], edx
lea ecx, [ebp + edi]
movzx edx, byte [ecx + 1]
movzx esi, byte [ecx + 2]
movzx ecx, byte [ecx + 3]
shl edx, 0x10
shl esi, 8
or edx, esi
mov esi, dword [esp + 0x838]
or edx, ecx
movzx ecx, byte [esp + edi + 0x10]
lea edi, [eax + 0xb4]
shl ecx, 0x18
or edx, ecx
lea ecx, [ebp + edi]
mov dword [esi + 0xc], edx
movzx edx, byte [ecx + 1]
movzx esi, byte [ecx + 2]
movzx ecx, byte [ecx + 3]
shl edx, 0x10
shl esi, 8
or edx, esi
or edx, ecx
movzx ecx, byte [esp + edi + 0x10]
lea edi, [eax + 0xb8]
shl ecx, 0x18
or edx, ecx
mov ecx, dword [esp + 0x838]
mov dword [ecx + 0x10], edx
lea ecx, [ebp + edi]
movzx edx, byte [ecx + 1]
movzx esi, byte [ecx + 2]
movzx ecx, byte [ecx + 3]
shl edx, 0x10
shl esi, 8
or edx, esi
mov esi, dword [esp + 0x838]
or edx, ecx
movzx ecx, byte [esp + edi + 0x10]
lea edi, [eax + 0xbc]
shl ecx, 0x18
or edx, ecx
lea ecx, [ebp + edi]
mov dword [esi + 0x14], edx
movzx edx, byte [ecx + 1]
movzx esi, byte [ecx + 2]
movzx ecx, byte [ecx + 3]
shl edx, 0x10
shl esi, 8
or edx, esi
or edx, ecx
movzx ecx, byte [esp + edi + 0x10]
lea edi, [eax + 0xc0]
shl ecx, 0x18
or edx, ecx
mov ecx, dword [esp + 0x838]
mov dword [ecx + 0x18], edx
lea ecx, [ebp + edi]
movzx edx, byte [ecx + 1]
movzx esi, byte [ecx + 2]
movzx ecx, byte [ecx + 3]
shl edx, 0x10
shl esi, 8
or edx, esi
mov esi, dword [esp + 0x838]
or edx, ecx
movzx ecx, byte [esp + edi + 0x10]
lea edi, [eax + 0xc4]
shl ecx, 0x18
or edx, ecx
lea ecx, [ebp + edi]
mov dword [esi + 0x1c], edx
movzx edx, byte [ecx + 1]
movzx esi, byte [ecx + 2]
movzx ecx, byte [ecx + 3]
shl edx, 0x10
shl esi, 8
or edx, esi
or edx, ecx
movzx ecx, byte [esp + edi + 0x10]
lea edi, [eax + 0xc8]
shl ecx, 0x18
or edx, ecx
mov ecx, dword [esp + 0x838]
mov dword [ecx + 0x20], edx
lea ecx, [ebp + edi]
movzx edx, byte [ecx + 1]
movzx esi, byte [ecx + 2]
movzx ecx, byte [ecx + 3]
shl edx, 0x10
shl esi, 8
or edx, esi
mov esi, dword [esp + 0x838]
or edx, ecx
movzx ecx, byte [esp + edi + 0x10]
lea edi, [eax + 0xcc]
shl ecx, 0x18
or edx, ecx
lea ecx, [ebp + edi]
mov dword [esi + 0x24], edx
movzx edx, byte [ecx + 1]
movzx esi, byte [ecx + 2]
movzx ecx, byte [ecx + 3]
shl edx, 0x10
shl esi, 8
or edx, esi
or edx, ecx
movzx ecx, byte [esp + edi + 0x10]
lea edi, [eax + 0xd0]
shl ecx, 0x18
or edx, ecx
mov ecx, dword [esp + 0x838]
mov dword [ecx + 0x28], edx
lea ecx, [ebp + edi]
movzx edx, byte [ecx + 1]
movzx esi, byte [ecx + 2]
movzx ecx, byte [ecx + 3]
shl edx, 0x10
shl esi, 8
or edx, esi
mov esi, dword [esp + 0x838]
or edx, ecx
movzx ecx, byte [esp + edi + 0x10]
lea edi, [eax + 0xd4]
shl ecx, 0x18
or edx, ecx
lea ecx, [ebp + edi]
mov dword [esi + 0x2c], edx
movzx edx, byte [ecx + 1]
movzx esi, byte [ecx + 2]
movzx ecx, byte [ecx + 3]
shl edx, 0x10
shl esi, 8
or edx, esi
or edx, ecx
movzx ecx, byte [esp + edi + 0x10]
lea edi, [eax + 0xd8]
shl ecx, 0x18
or edx, ecx
mov ecx, dword [esp + 0x838]
mov dword [ecx + 0x30], edx
lea ecx, [ebp + edi]
movzx edx, byte [ecx + 1]
movzx esi, byte [ecx + 2]
movzx ecx, byte [ecx + 3]
shl edx, 0x10
shl esi, 8
or edx, esi
mov esi, dword [esp + 0x838]
or edx, ecx
movzx ecx, byte [esp + edi + 0x10]
lea edi, [eax + 0xdc]
add eax, 0xe0
shl ecx, 0x18
or edx, ecx
lea ecx, [ebp + edi]
add ebp, eax
mov dword [esi + 0x34], edx
movzx edx, byte [ecx + 1]
movzx esi, byte [ecx + 2]
movzx ecx, byte [ecx + 3]
shl edx, 0x10
shl esi, 8
or edx, esi
mov esi, dword [esp + 0x838]
or edx, ecx
movzx ecx, byte [esp + edi + 0x10]
shl ecx, 0x18
or edx, ecx
mov ecx, dword [esp + 0x838]
mov dword [ecx + 0x38], edx
movzx edx, byte [ebp + 1]
movzx ecx, byte [ebp + 2]
movzx eax, byte [esp + eax + 0x10]
shl edx, 0x10
shl ecx, 8
xor edi, edi
or edx, ecx
movzx ecx, byte [ebp + 3]
shl eax, 0x18
or edx, ecx
or edx, eax
mov eax, dword [esp + 0x830]
mov dword [esi + 0x3c], edx
test eax, eax
je 0x517741
mov eax, dword [esp + 0x830]
mov dword [eax + 0x44], 1
jmp 0x517741
test esi, esi
jne 0x517cf1
mov edi, 0xffffffff
jmp 0x517760
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 0x517760