Function at 0x1004eb70
Capabilities:
Check if file exists
Get file attributes
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100a9a87
mov eax, dword fs:[0]
push eax
sub esp, 0x23c
mov eax, dword [0x100dc008]
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 edi, ecx
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
push 0
push 0
push 3
push 0
push 1
push connect
push ecx
mov dword [ebp - 0x230], ecx
mov dword [ebp - 0x240], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x228], ebx
mov dword [ebp - 4], 0
cmp ebx, 0xffffffff
jne 0x1004ebe8
call fcn.10015440
mov esi, eax
jmp 0x1004f1c1
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
mov dword [ebp - 0x22c], esi
cmp esi, 0xffffffff
jne 0x1004ec08
mov esi, 0x80004005
jmp 0x1004f1c1
cmp esi, 0xa00000
jbe 0x1004ec1a
mov esi, 0xe00e1001
jmp 0x1004f1c1
lea eax, [esi + 2]
push 0x100dd790
push eax
call fcn.1007bfcf
mov ebx, eax
add esp, 8
mov dword [ebp - 0x224], ebx
mov byte [ebp - 4], 1
test ebx, ebx
jne 0x1004ec45
mov esi, 0x8007000e
jmp 0x1004f19c
lea eax, [esi + 2]
push eax
push 0
push ebx
call fcn.1008b230
add esp, 0xc
xorps xmm0, xmm0
movlpd qword [ebp - 0x238], xmm0
push 0
push 0
push dword [ebp - 0x234]
push dword [ebp - 0x238]
push dword [ebp - 0x228]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x1004ec8b
call fcn.10015440
mov esi, eax
jmp 0x1004f19c
push 0
lea eax, [ebp - 0x248]
mov dword [ebp - 0x248], 0
push eax
push esi
push ebx
push dword [ebp - 0x228]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1004ecbc
call fcn.10015440
mov esi, eax
jmp 0x1004f19c
mov ecx, ebx
mov edx, str.MEDIA_DESCRIPTOR
mov esi, 0xc
nop dword [eax + eax]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x1004f197
add ecx, 4
add edx, 4
sub esi, 4
jae 0x1004ecd0
cmp byte [ebx + 0x10], 2
jb 0x1004ee54
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.1008b230
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x218]
add esp, 0xc
push dword [ebp - 0x230]
push eax
call esi
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
push 0x100d6068
push eax
call esi
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x1004ed4b
mov esi, 0xe003200a
jmp 0x1004f19c
push 0
push 0
push 3
push 0
push 1
push connect
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x23c], esi
mov byte [ebp - 4], 2
cmp esi, 0xffffffff
jne 0x1004ed99
call fcn.10015440
lea ecx, [ebp - 0x23c]
mov byte [ebp - 4], 1
mov esi, eax
call fcn.100229a0
mov ebx, dword [ebp - 0x224]
jmp 0x1004f19c
push esi
mov ecx, edi
call fcn.100506f0
test eax, eax
je 0x1004edc4
lea ecx, [ebp - 0x23c]
mov byte [ebp - 4], 1
mov esi, 0xe003200a
call fcn.100229a0
mov ebx, dword [ebp - 0x224]
jmp 0x1004f19c
mov eax, dword [ebp - 0x240]
test eax, eax
je 0x1004eddc
lea ecx, [ebp - 0x218]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x238]
xorps xmm0, xmm0
push eax
push esi
movlpd qword [ebp - 0x238], xmm0
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x1004ee1a
call fcn.10015440
lea ecx, [ebp - 0x23c]
mov byte [ebp - 4], 1
mov esi, eax
call fcn.100229a0
mov ebx, dword [ebp - 0x224]
jmp 0x1004f19c
mov ecx, dword [ebp - 0x238]
sub ecx, dword [edi + 0x20]
mov eax, dword [ebp - 0x234]
sbb eax, 0
mov dword [edi + 0x358], ecx
mov dword [edi + 0x35c], eax
lea ecx, [ebp - 0x23c]
xor esi, esi
mov byte [ebp - 4], 1
call fcn.100229a0
mov ebx, dword [ebp - 0x224]
jmp 0x1004f19c
mov edx, dword [ebx + 0x50]
mov ecx, dword [ebp - 0x22c]
mov dword [ebp - 0x23c], edx
lea eax, [edx + 0x18]
cmp eax, ecx
ja 0x1004f18a
cmp word [ebx + 0x14], 0
je 0x1004f18a
movzx eax, word [edx + ebx + 0xe]
add edx, ebx
lea eax, [eax + eax*4]
shl eax, 4
add eax, dword [edx + 0x14]
cmp eax, ecx
ja 0x1004f18a
mov eax, dword [edx]
add eax, 0x96
imul eax, eax, 0x930
mov dword [edi + 0x20], eax
xor eax, eax
mov ebx, dword [edx + 0x14]
movzx ecx, byte [edx + 0xa]
add ebx, dword [ebp - 0x224]
test ecx, ecx
je 0x1004eec2
cmp byte [ebx + 4], 1
je 0x1004eec2
inc eax
add ebx, 0x50
cmp eax, ecx
jl 0x1004eeb4
cmp eax, ecx
jge 0x1004f18a
movzx ecx, word [ebx + 0x10]
mov dword [edi + 0x14], ecx
mov eax, dword [edx + 4]
mul ecx
mov dword [ebp - 0x22c], 0
mov dword [edi + 0x358], eax
mov dword [edi + 0x35c], edx
mov al, byte [ebx]
mov byte [ebp - 0x234], al
lea eax, [ebp - 0x22c]
push eax
push dword [ebp - 0x234]
call fcn.1004e950
mov esi, eax
test esi, esi
js 0x1004f18f
cmp esi, 1
je 0x1004f18f
mov edx, dword [ebp - 0x22c]
push ecx
push edx
mov ecx, edi
call fcn.1004fb50
mov esi, eax
test esi, esi
js 0x1004f18f
cmp esi, 1
je 0x1004f18f
mov esi, dword [ebx + 0x34]
mov ecx, dword [ebp - 0x240]
mov ebx, dword [ebp - 0x224]
mov dword [ebp - 0x234], esi
test ecx, ecx
je 0x1004ef91
cmp byte [ebx + 0x10], 1
jne 0x1004ef67
cmp byte [ebx + 0x11], 5
jb 0x1004ef67
mov eax, 1
jmp 0x1004ef69
xor eax, eax
push eax
push esi
push ebx
push ecx
push dword [ebp - 0x230]
call fcn.1004f200
mov esi, eax
test esi, esi
js 0x1004f19c
cmp esi, 1
je 0x1004f19c
mov edx, dword [ebp - 0x22c]
cmp dword [edi + 0x350], 0
je 0x1004efa1
xor esi, esi
jmp 0x1004f19c
cmp edx, 1
jne 0x1004efb3
mov dword [edi + 0x28], edx
mov dword [edi + 0x360], 0x930
xor eax, eax
xorps xmm0, xmm0
mov dword [ebp - 0x230], eax
xor esi, esi
mov eax, dword [ebp - 0x23c]
movq qword [ebp - 0x244], xmm0
mov edx, dword [ebx + eax + 0x14]
add edx, 4
cmp byte [ebx + eax + 0xa], 0
jbe 0x1004f178
mov cl, byte [ebp - 0x23d]
add edx, ebx
mov al, byte [ebp - 0x243]
mov byte [ebp - 0x21d], cl
mov cl, byte [ebp - 0x23e]
mov byte [ebp - 0x21c], cl
mov cl, byte [ebp - 0x23f]
mov byte [ebp - 0x21b], cl
mov cl, byte [ebp - 0x242]
mov byte [ebp - 0x21a], cl
mov byte [ebp - 0x219], al
nop
mov al, byte [edx]
cmp al, 0xa2
jne 0x1004f05b
mov cl, byte [edx - 2]
mov ch, byte [edx + 5]
mov ah, byte [edx + 6]
mov byte [ebp - 0x219], cl
mov cl, byte [edx + 7]
mov byte [ebp - 0x21a], 0xaa
mov byte [ebp - 0x21b], ch
mov byte [ebp - 0x21c], ah
mov byte [ebp - 0x21d], cl
mov dword [ebp - 0x230], 1
cmp al, 0x99
ja 0x1004f0e9
movzx eax, word [edx + 0xc]
cmp eax, dword [edi + 0x14]
jne 0x1004f183
mov eax, dword [ebp - 0x234]
cmp dword [edx + 0x30], eax
jne 0x1004f183
mov eax, dword [edi + 0x350]
lea ecx, [edi + eax*8]
mov al, byte [edx - 2]
xor al, byte [ecx + 0x31]
and al, 0xf
xor byte [ecx + 0x31], al
mov eax, dword [edi + 0x350]
lea ecx, [edi + eax*8]
mov al, byte [edx - 2]
xor al, byte [ecx + 0x31]
and al, 0xf
xor al, byte [edx - 2]
mov byte [ecx + 0x31], al
mov cl, byte [edi + 0x350]
mov eax, dword [edi + 0x350]
inc cl
mov byte [edi + eax*8 + 0x32], cl
mov ecx, dword [edi + 0x350]
mov al, byte [edx + 5]
mov byte [edi + ecx*8 + 0x35], al
mov ecx, dword [edi + 0x350]
mov al, byte [edx + 6]
mov byte [edi + ecx*8 + 0x36], al
mov ecx, dword [edi + 0x350]
mov al, byte [edx + 7]
mov byte [edi + ecx*8 + 0x37], al
inc dword [edi + 0x350]
mov eax, dword [ebp - 0x23c]
inc esi
add edx, 0x50
movzx eax, byte [ebx + eax + 0xa]
cmp esi, eax
jl 0x1004f020
mov eax, dword [ebp - 0x230]
test eax, eax
je 0x1004f178
mov eax, dword [edi + 0x350]
mov dl, byte [ebp - 0x219]
lea ecx, [edi + eax*8]
mov al, byte [ecx + 0x31]
xor al, dl
and al, 0xf
xor byte [ecx + 0x31], al
mov eax, dword [edi + 0x350]
lea ecx, [edi + eax*8]
mov al, byte [ecx + 0x31]
xor al, dl
and al, 0xf
xor al, dl
mov byte [ecx + 0x31], al
mov eax, dword [edi + 0x350]
mov cl, byte [ebp - 0x21a]
mov byte [edi + eax*8 + 0x32], cl
mov eax, dword [edi + 0x350]
mov cl, byte [ebp - 0x21b]
mov byte [edi + eax*8 + 0x35], cl
mov eax, dword [edi + 0x350]
mov cl, byte [ebp - 0x21c]
mov byte [edi + eax*8 + 0x36], cl
mov eax, dword [edi + 0x350]
mov cl, byte [ebp - 0x21d]
mov byte [edi + eax*8 + 0x37], cl
mov ecx, edi
call fcn.1004fd90
xor esi, esi
jmp 0x1004f19c
mov esi, 0x80004005
jmp 0x1004f19c
mov esi, 0x80004005
mov ebx, dword [ebp - 0x224]
jmp 0x1004f19c
mov esi, 0xe00e1001
mov byte [ebp - 4], 3
test ebx, ebx
je 0x1004f1b7
push ebx
call fcn.1007bfd8
add esp, 4
mov dword [ebp - 0x224], 0
mov byte [ebp - 4], 0
mov ebx, dword [ebp - 0x228]
mov dword [ebp - 4], 0xffffffff
cmp ebx, 0xffffffff
je 0x1004f1d4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
mov dword [ebp - 0x228], 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.1007bfb0
mov esp, ebp
pop ebp
ret 8