Function at 0x4e31ac
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov dword [ebp - 0x44], eax
mov ebx, edx
mov edi, ecx
mov dword [esp], eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_feof
test eax, eax
jne 0x4e33e2
mov eax, dword [ebx + 0xc]
mov esi, dword [ebx]
add esi, eax
mov edx, dword [ebx + 8]
sub edx, eax
mov dword [ebp - 0x3c], edx
mov eax, dword [ebx + 0x14]
test eax, eax
jne 0x4e32f1
cmp edx, 0x1a
jg 0x4e329d
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x4e321b
mov edx, dword [ebx]
mov ecx, dword [ebx + 8]
sub ecx, eax
mov dword [ebx + 8], ecx
test ecx, ecx
jle 0x4e3216
mov dword [esp + 8], ecx
add eax, edx
mov dword [esp + 4], eax
mov dword [esp], edx
call sub.api_ms_win_crt_private_l1_1_0.dll_memmove
xor eax, eax
mov dword [ebx + 0xc], eax
mov esi, dword [ebx + 8]
mov eax, dword [ebx + 4]
sub eax, esi
cmp eax, 0xfff
jg 0x4e3251
mov eax, dword [ebx]
add esi, 0x2000
test eax, eax
je 0x4e3244
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
jmp 0x4e324c
mov dword [esp], esi
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov dword [ebx], eax
mov dword [ebx + 4], esi
mov eax, dword [ebp - 0x44]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x1000
mov dword [esp + 4], 1
mov eax, dword [ebx + 8]
add eax, dword [ebx]
mov dword [esp], eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
add eax, dword [ebx + 8]
cmp eax, dword [ebx + 4]
jg 0x4e3280
mov dword [ebx + 8], eax
mov eax, dword [ebp - 0x44]
mov dword [esp], eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_feof
test eax, eax
je 0x4e31cc
mov eax, 1
jmp 0x4e33e4
mov dword [esp + 8], 4
mov dword [esp + 4], str.OggS
mov dword [esp], esi
call sub.api_ms_win_crt_private_l1_1_0.dll_memcmp
mov dword [ebp - 0x40], eax
test eax, eax
jne 0x4e3387
movzx eax, byte [esi + 0x1a]
add eax, 0x1b
cmp dword [ebp - 0x3c], eax
jl 0x4e31ef
mov edx, dword [ebx + 0x18]
movzx ecx, byte [esi + 0x1a]
cmp dword [ebp - 0x40], ecx
jge 0x4e32ee
mov ecx, dword [ebp - 0x40]
movzx ecx, byte [esi + ecx + 0x1b]
add ecx, edx
mov dword [ebx + 0x18], ecx
inc dword [ebp - 0x40]
jmp 0x4e32d0
mov dword [ebx + 0x14], eax
add eax, dword [ebx + 0x18]
cmp dword [ebp - 0x3c], eax
jl 0x4e31ef
mov edx, dword [esi + 0x16]
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x48], edx
lea ecx, [esi + 0x16]
mov dword [ebp - 0x40], ecx
xor eax, eax
mov dword [esi + 0x16], eax
mov dword [ebp - 0x28], esi
mov eax, dword [ebx + 0x14]
mov dword [ebp - 0x24], eax
add eax, esi
mov dword [ebp - 0x20], eax
mov eax, dword [ebx + 0x18]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x28]
call fcn.005066ae
mov dword [esp + 8], 4
mov ecx, dword [ebp - 0x40]
mov dword [esp + 4], ecx
lea eax, [ebp - 0x2c]
mov dword [esp], eax
call sub.api_ms_win_crt_private_l1_1_0.dll_memcmp
test eax, eax
mov edx, dword [ebp - 0x48]
je 0x4e3353
mov dword [esi + 0x16], edx
jmp 0x4e3387
test edi, edi
je 0x4e336f
mov eax, dword [ebx + 0xc]
add eax, dword [ebx]
mov dword [edi], eax
mov edx, dword [ebx + 0x14]
mov dword [edi + 4], edx
add eax, edx
mov dword [edi + 8], eax
mov eax, dword [ebx + 0x18]
mov dword [edi + 0xc], eax
xor edx, edx
mov dword [ebx + 0x10], edx
mov esi, dword [ebx + 0x18]
add esi, dword [ebx + 0x14]
add dword [ebx + 0xc], esi
xor ecx, ecx
mov dword [ebx + 0x14], ecx
mov dword [ebx + 0x18], ecx
jmp 0x4e33be
xor eax, eax
mov dword [ebx + 0x14], eax
mov dword [ebx + 0x18], eax
mov eax, dword [ebp - 0x3c]
dec eax
mov dword [esp + 8], eax
mov dword [esp + 4], 0x4f
lea eax, [esi + 1]
mov dword [esp], eax
call sub.api_ms_win_crt_private_l1_1_0.dll_memchr
mov edx, dword [ebx]
test eax, eax
jne 0x4e33b5
mov eax, dword [ebx + 8]
add eax, edx
mov ecx, eax
sub ecx, edx
mov dword [ebx + 0xc], ecx
sub esi, eax
test esi, esi
jg 0x4e3293
je 0x4e31ef
cmp dword [ebx + 0x10], 0
jne 0x4e31cc
mov dword [ebx + 0x10], 1
jmp 0x4e31ef
xor eax, eax
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret