Function at 0x516120
Capabilities:
Read file on windows
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x571fb2
mov eax, dword fs:[0]
push eax
sub esp, 0x444
mov eax, dword [0x5c4008]
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 ecx, 0x70a6a4
call fcn.0056b0a5
mov ecx, dword [ebp + 8]
mov dword [esi + 0x30], 0
mov dword [esi + 0x64], 0
mov dword [esi + 0x34], 0
mov eax, dword [0x6d07c8]
mov dword [esi + 0x84], eax
mov dword [esi + 0x48], 0
mov dword [esi + 0x3c], 0
mov dword [esi + 0x44], 0
mov dword [esi + 0x40], 0
mov dword [esi + 0x38], esi
test ecx, ecx
jne 0x5163f9
lea eax, [ebp - 0x438]
push eax
push dword [ebp + 0xc]
call fcn.0050f6c0
mov eax, dword [ebp - 0x48]
mov dword [esi + 0xb0], eax
mov eax, dword [ebp - 0x44]
mov dword [esi + 0xb4], eax
mov eax, dword [ebp - 0x40]
mov dword [esi + 0xc4], eax
mov eax, dword [ebp - 0x4c]
test eax, eax
jne 0x51621a
lea eax, [ebp - 0x438]
push 0x5b1154
push eax
call fcn.00556c35
add esp, 8
mov dword [esi + 0xa8], eax
test eax, eax
jne 0x51620e
lea eax, [ebp - 0x438]
push eax
push str.Could_not_read_file__s
push 1
call fcn.004e9620
add esp, 0xc
jmp 0x5166f4
mov dword [esi + 0xbc], 0xffffffff
jmp 0x516230
mov dword [esi + 0xa8], eax
mov eax, dword [ebp - 0x3c]
mov dword [esi + 0xbc], eax
mov byte [esi + 0xb8], 0
push dword [esi + 0xb4]
mov ecx, dword [esi + 0xa8]
push dword [esi + 0xb0]
call fcn.00517610
push dword [esi + 0xa8]
lea eax, [ebp - 0x2c]
push 0x1c
push 1
push eax
call fcn.00557dc6
add esp, 0x18
cmp eax, 0x1c
jne 0x5161f3
test byte [ebp - 0x16], 1
je 0x516272
mov dword [esi + 0x84], 0
mov dx, word [ebp - 0x24]
mov eax, dword [ebp - 0x1c]
mov di, word [ebp - 0x26]
mov bx, word [ebp - 0x28]
mov dword [esi + 0x28], eax
cmp dx, 0xffff
je 0x516294
mov cx, word [ebp - 0x22]
cmp cx, 0xffff
jne 0x5162a2
mov dx, bx
mov cx, di
mov word [ebp - 0x24], dx
mov word [ebp - 0x22], cx
movsx eax, word [ebp - 0x14]
mov dword [esi + 0x2c], eax
movzx eax, word [ebp - 0x20]
mov word [esi + 0x5c], ax
movzx eax, word [ebp - 0x1e]
mov word [esi + 0x5e], ax
movzx eax, word [ebp - 0x2c]
mov word [esi + 0x50], ax
movzx eax, word [ebp - 0x2a]
mov word [esi + 0x52], ax
movzx eax, word [ebp - 0x18]
mov word [esi + 0x60], ax
mov eax, dword [ebp - 0x16]
shr eax, 1
and al, 1
mov word [esi + 0x54], bx
mov byte [esi + 0x62], al
movsx eax, word [ebp - 0x12]
mov word [esi + 0x56], di
mov word [esi + 0x58], dx
mov word [esi + 0x5a], cx
test eax, eax
js 0x516337
cmp eax, 2
jle 0x516347
cmp eax, 4
jne 0x516337
push 0x24
call fcn.0055144c
mov ebx, eax
mov dword [ebp - 0x444], ebx
mov dword [ebx], vtable.CCodecVpx.0
mov dword [ebx + 0x10], 0
mov dword [ebx + 0x14], 0
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x1c], 0
mov dword [ebx + 0x20], 0
jmp 0x516363
push eax
push str.Unknown_codec_detected:__i.
push 1
call fcn.004e9620
add esp, 0xc
push 0x10
call fcn.0055144c
mov ebx, eax
mov dword [ebp - 0x444], ebx
mov dword [ebx + 0xc], 0
mov dword [ebx], vtable.CCodecRle.0
mov dword [esi + 0xc0], ebx
lea ecx, [ebp - 0x2c]
mov eax, dword [ebx]
add esp, 4
mov edi, dword [eax + 4]
push ecx
mov ecx, edi
call dword [0x579378]
mov ecx, ebx
call edi
mov eax, dword [esi + 0x28]
shl eax, 2
push eax
call fcn.00555564
mov ecx, dword [esi + 0x28]
add esp, 4
shl ecx, 2
mov dword [esi + 0x30], eax
push dword [esi + 0xa8]
push ecx
push 1
push eax
call fcn.00557dc6
mov ecx, dword [esi + 0x28]
add esp, 0x10
shl ecx, 2
cmp eax, ecx
jne 0x5161f3
push dword [esi + 4]
call fcn.0050f7a0
mov edi, eax
test edi, edi
je 0x5163f1
push 0x28
call fcn.0055144c
add esp, 4
mov dword [ebp - 0x444], eax
push edi
push ecx
mov ecx, eax
mov dword [ebp - 4], 0
call fcn.00508360
mov dword [ebp - 4], 0xffffffff
mov dword [esi + 0x34], eax
mov eax, dword [esi + 0x28]
jmp 0x5164a9
movzx eax, word [ecx + 0xc]
mov word [esi + 0x5c], ax
movzx eax, word [ecx + 0xe]
mov word [esi + 0x5e], ax
movzx eax, word [ecx]
mov word [esi + 0x50], ax
movzx eax, word [ecx + 2]
mov word [esi + 0x52], ax
movzx eax, word [ecx + 8]
mov word [esi + 0x58], ax
movzx eax, word [ecx + 0xa]
mov word [esi + 0x5a], ax
movzx eax, word [ecx + 4]
mov word [esi + 0x54], ax
movzx eax, word [ecx + 6]
mov word [esi + 0x56], ax
movzx eax, word [ecx + 0x16]
mov edx, eax
test al, 1
je 0x516450
mov dword [esi + 0x84], 0
movzx edx, word [ecx + 0x16]
shr edx, 1
and dl, 1
mov dword [esi + 0x4c], 0
xor eax, eax
mov byte [esi + 0x62], dl
mov word [esi + 0x60], ax
mov dword [esi + 0xa8], eax
mov dword [esi + 0xb0], eax
mov dword [esi + 0xb4], eax
mov byte [esi + 0xb8], al
mov dword [esi + 0x30], eax
mov dword [esi + 0xc0], eax
mov dword [esi + 0xc4], eax
mov eax, 1
mov dword [esi + 0x28], 1
mov dword [esi + 0x2c], 0x50
mov dword [esi + 0xbc], 0xffffffff
push eax
mov ecx, esi
call fcn.0050fb30
mov eax, dword [esi + 0x84]
movsx ebx, word [esi + 0x58]
mov dword [esi + 0x74], 0xffffffff
mov word [esi + 0xa4], 0x100
lea edx, [eax + eax]
mov dword [esi + 0x64], 0
mov byte [esi + 0x63], 0
lea edi, [ebx + edx]
mov ecx, dword [0x6d07cc]
sub ecx, edx
mov dword [ebp - 0x440], edx
mov dword [ebp - 0x43c], ecx
mov dword [ebp - 0x44c], edi
cmp edi, dword [0x6d07cc]
jg 0x516510
mov dword [ebp - 0x448], 1
mov dword [esi + 0x9c], ebx
jmp 0x51653b
mov eax, ebx
cdq
idiv ecx
mov eax, ebx
mov ecx, edx
cdq
idiv dword [ebp - 0x43c]
mov edx, dword [ebp - 0x440]
mov ebx, ecx
inc eax
mov dword [esi + 0x9c], ecx
mov ecx, dword [ebp - 0x43c]
mov dword [ebp - 0x448], eax
movsx edi, word [esi + 0x5a]
lea eax, [edi + edx]
mov dword [ebp - 0x444], eax
cmp eax, dword [0x6d07cc]
jg 0x51655d
mov eax, 1
mov dword [esi + 0xa0], edi
jmp 0x51657c
mov eax, edi
cdq
idiv ecx
mov eax, edi
mov ecx, edx
cdq
idiv dword [ebp - 0x43c]
mov edx, dword [ebp - 0x440]
mov edi, ecx
mov dword [esi + 0xa0], ecx
inc eax
mov ecx, dword [ebp - 0x448]
mov dword [esi + 0x98], eax
mov dword [ebp - 0x43c], eax
imul eax, ecx
mov dword [esi + 0x94], ecx
lea ecx, [edx + ebx]
mov dword [esi + 0x70], eax
cmp byte [0x6d07d0], 0
je 0x5165c0
mov eax, ecx
mov dword [esi + 0x8c], ecx
and eax, 3
je 0x5165e6
sub ecx, eax
add ecx, 4
mov dword [esi + 0x8c], ecx
jmp 0x5165e6
mov dword [esi + 0x8c], 2
cmp ecx, 2
jle 0x5165e6
mov eax, 2
add eax, eax
cmp eax, ecx
jl 0x5165d4
mov edi, dword [esi + 0xa0]
mov dword [esi + 0x8c], eax
cmp byte [0x6d07d0], 0
lea ecx, [edx + edi]
je 0x51660e
mov eax, ecx
mov dword [esi + 0x90], ecx
and eax, 3
je 0x51660a
sub ecx, eax
add ecx, 4
mov dword [esi + 0x90], ecx
mov eax, ecx
jmp 0x51662d
mov eax, 2
mov dword [esi + 0x90], 2
cmp ecx, eax
jle 0x51662d
add eax, eax
cmp eax, ecx
jl 0x516621
mov dword [esi + 0x90], eax
mov ebx, dword [ebp - 0x448]
mov ecx, dword [ebp - 0x43c]
mov dword [ebp - 0x440], eax
cmp ebx, 1
jne 0x51666a
mov dword [ebp - 0x440], eax
cmp ecx, ebx
jne 0x51666a
mov edi, dword [esi + 0x8c]
shl edi, 2
mov edx, edi
mov dword [esi + 0x7c], edi
imul edx, eax
mov dword [esi + 0x68], edx
mov dword [esi + 0x88], edx
jmp 0x5166ad
mov edi, dword [ebp - 0x44c]
lea eax, [ebx - 1]
shl edi, 2
dec ecx
imul ecx, eax
mov edx, edi
imul edx, dword [ebp - 0x444]
mov eax, dword [esi + 0x8c]
mov dword [esi + 0x7c], edi
mov dword [esi + 0x68], edx
imul ecx, dword [0x6d07cc]
imul ecx, dword [0x6d07cc]
imul eax, dword [ebp - 0x440]
lea eax, [ecx + eax*4]
mov dword [esi + 0x88], eax
lea eax, [edi + 4]
imul eax, dword [esi + 0x84]
push edx
mov dword [esi + 0x80], eax
call fcn.00555564
add esp, 4
mov dword [esi + 0x64], eax
cmp dword [esi + 4], 0xffffffff
je 0x5166e6
push ecx
push esi
mov dword [esi + 0x74], 0xffffffff
mov dword [esi + 0x78], 0
call fcn.00517400
jmp 0x5166f4
mov dword [esi + 0x74], 0
mov dword [esi + 0x78], 0xffffffff
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.00551170
mov esp, ebp
pop ebp
ret 8