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

Disassembly:
push 0xffffffffffffffff
push 0x100ad821
mov eax, dword fs:[0]
push eax
sub esp, 0x240
mov eax, dword [0x100de040]
xor eax, esp
mov dword [esp + 0x238], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x100de040]
xor eax, esp
push eax
lea eax, [esp + 0x254]
mov dword fs:[0], eax
mov eax, dword [esp + 0x264]
push 0
push 0
push 3
push 0
push 1
push connect
push eax
mov edi, edx
mov dword [esp + 0x58], eax
mov dword [esp + 0x48], ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x25c], 0
cmp ebx, 0xffffffff
jne 0x1004e9b2
call fcn.10002d30
jmp 0x1004eee1
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esp + 0x20], eax
cmp eax, 0xffffffff
jne 0x1004e9d0
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1004eedc
cmp eax, 0xa00000
ja 0x1004eb3a
lea esi, [eax + 2]
push 0x100e33b4
push esi
call fcn.100628bb
mov ebp, eax
add esp, 8
mov dword [esp + 0x18], ebp
mov byte [esp + 0x25c], 1
test ebp, ebp
jne 0x1004ea0f
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x8007000e
jmp 0x1004eee1
push esi
push 0
push ebp
call fcn.10064e10
add esp, 0xc
xor ecx, ecx
push ecx
push ecx
push ecx
xor eax, eax
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x1004ea4e
call fcn.10002d30
mov edi, eax
lea esi, [esp + 0x18]
call fcn.10008990
lea esi, [esp + 0x1c]
call fcn.1000fee0
mov eax, edi
jmp 0x1004eee1
mov eax, dword [esp + 0x20]
push 0
lea edx, [esp + 0x38]
push edx
push eax
push ebp
push ebx
mov dword [esp + 0x48], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1004ea2e
mov eax, str.MEDIA_DESCRIPTOR
mov edx, ebp
mov ecx, 0x10
sub edx, eax
lea esp, [esp]
mov esi, dword [eax + edx]
cmp esi, dword [eax]
jne 0x1004eb31
sub ecx, 4
add eax, 4
cmp ecx, 4
jae 0x1004ea80
mov bl, 2
cmp byte [ebp + 0x10], bl
jb 0x1004ebe9
xor ecx, ecx
push 0x206
push ecx
lea edx, [esp + 0x4e]
push edx
mov word [esp + 0x50], cx
call fcn.10064e10
mov eax, dword [esp + 0x48]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
add esp, 0xc
push eax
lea ecx, [esp + 0x48]
push ecx
call esi
lea edx, [esp + 0x44]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
push 0x100d4e2c
push eax
call esi
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1004eb60
push 0
push 0
push 3
push 0
push 1
push connect
lea ecx, [esp + 0x5c]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
mov dword [esp + 0x20], ebp
mov byte [esp + 0x25c], bl
cmp ebp, 0xffffffff
jne 0x1004eb4b
call fcn.10002d30
lea esi, [esp + 0x20]
mov edi, eax
call fcn.1000fee0
jmp 0x1004ea35
lea esi, [esp + 0x18]
call fcn.10008990
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xe00e1001
jmp 0x1004eee1
push ebp
mov ecx, edi
call fcn.100502b0
test eax, eax
je 0x1004eb7c
lea esi, [esp + 0x20]
call fcn.1000fee0
lea esi, [esp + 0x18]
call fcn.10008990
lea esi, [esp + 0x1c]
call fcn.1000fee0
mov eax, 0xe003200a
jmp 0x1004eee1
mov eax, dword [esp + 0x2c]
xor ebx, ebx
cmp eax, ebx
je 0x1004eb8e
lea edx, [esp + 0x44]
push edx
push eax
call esi
lea eax, [esp + 0x24]
push eax
push ebp
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x1004eb1c
mov ecx, dword [edi + 0x20]
mov eax, dword [esp + 0x24]
xor edx, edx
sub eax, ecx
mov ecx, dword [esp + 0x28]
sbb ecx, edx
lea esi, [esp + 0x20]
mov dword [edi + 0x358], eax
mov dword [edi + 0x35c], ecx
call fcn.1000fee0
lea esi, [esp + 0x18]
call fcn.10008990
lea esi, [esp + 0x1c]
call fcn.1000fee0
xor eax, eax
jmp 0x1004eee1
mov eax, dword [ebp + 0x50]
mov esi, dword [esp + 0x20]
lea edx, [eax + 0x18]
cmp edx, esi
ja 0x1004eeca
cmp word [ebp + 0x14], 0
je 0x1004eeca
movzx ecx, word [eax + ebp + 0xe]
lea ecx, [ecx + ecx*4]
lea edx, [eax + ebp + 0x14]
shl ecx, 4
add ecx, dword [edx]
mov dword [esp + 0x38], edx
cmp ecx, esi
ja 0x1004eeca
mov ecx, dword [eax + ebp]
add ecx, 0x96
imul ecx, ecx, 0x930
mov dword [edi + 0x20], ecx
mov esi, dword [edx]
lea edx, [eax + ebp + 0xa]
mov dword [esp + 0x30], edx
movzx edx, byte [edx]
add esi, ebp
xor ecx, ecx
test edx, edx
jle 0x1004ec5e
lea ebx, [ebx]
cmp byte [esi + 4], 1
je 0x1004ec5e
inc ecx
add esi, 0x50
cmp ecx, edx
jl 0x1004ec50
cmp ecx, edx
jge 0x1004eeca
movzx ecx, word [esi + 0x10]
mov dword [edi + 0x14], ecx
mov eax, dword [eax + ebp + 4]
mul ecx
mov dword [edi + 0x358], eax
mov dword [edi + 0x35c], edx
movzx ecx, byte [esi]
and ecx, 7
mov dword [esp + 0x20], 0
cmp ecx, 7
ja 0x1004ece2
lea eax, [esp + 0x20]
call fcn.1004e6b0
mov ebx, eax
test ebx, ebx
jl 0x1004ece7
cmp ebx, 1
je 0x1004ece7
mov edx, dword [esp + 0x20]
push edx
mov edx, dword [edi + 0x14]
mov eax, edi
call fcn.1004f810
mov ebx, eax
test ebx, ebx
jl 0x1004ece7
cmp ebx, 1
je 0x1004ece7
mov edx, dword [esi + 0x34]
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x24], edx
test esi, esi
je 0x1004ed23
cmp byte [ebp + 0x10], 1
jne 0x1004ed00
cmp byte [ebp + 0x11], 5
jb 0x1004ed00
mov eax, 1
jmp 0x1004ed02
mov ebx, 0x80004005
lea esi, [esp + 0x18]
call fcn.10008990
lea esi, [esp + 0x1c]
call fcn.1000fee0
mov eax, ebx
jmp 0x1004eee1
xor eax, eax
mov ecx, dword [esp + 0x3c]
test ecx, ecx
je 0x1004eec0
push eax
push edx
push ecx
mov ecx, ebp
call fcn.1004ef10
mov ebx, eax
test ebx, ebx
jl 0x1004ece7
cmp ebx, 1
je 0x1004ece7
cmp dword [edi + 0x350], 0
jne 0x1004ebd0
mov eax, 1
cmp dword [esp + 0x20], eax
jne 0x1004ed48
mov dword [edi + 0x28], eax
mov dword [edi + 0x360], 0x930
mov ecx, dword [esp + 0x30]
xor eax, eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x38]
mov eax, dword [eax]
add eax, ebp
xor esi, esi
xor ebp, ebp
cmp byte [ecx], 0
jbe 0x1004eeb4
mov dl, byte [esp + 0x3d]
add eax, 4
mov cl, byte [eax]
cmp cl, 0xa2
jne 0x1004ed9e
movzx ebx, byte [eax + 5]
mov dl, byte [eax - 2]
mov byte [esp + 0x41], bl
movzx ebx, byte [eax + 6]
mov byte [esp + 0x42], bl
movzx ebx, byte [eax + 7]
mov byte [esp + 0x3e], 0xaa
mov byte [esp + 0x43], bl
mov esi, 1
cmp cl, 0x99
ja 0x1004ee34
movzx ecx, word [eax + 0xc]
cmp ecx, dword [edi + 0x14]
jne 0x1004eeca
mov ecx, dword [esp + 0x24]
cmp dword [eax + 0x30], ecx
jne 0x1004eeca
mov ecx, dword [edi + 0x350]
movzx ebx, byte [edi + ecx*8 + 0x31]
xor bl, byte [eax - 2]
lea ecx, [edi + ecx*8 + 0x31]
and bl, 0xf
xor byte [ecx], bl
mov ecx, dword [edi + 0x350]
movzx ebx, byte [edi + ecx*8 + 0x31]
xor bl, byte [eax - 2]
lea ecx, [edi + ecx*8 + 0x31]
and bl, 0xf
xor bl, byte [eax - 2]
mov byte [ecx], bl
mov cl, byte [edi + 0x350]
mov ebx, dword [edi + 0x350]
inc cl
mov byte [edi + ebx*8 + 0x32], cl
movzx ebx, byte [eax + 5]
mov ecx, dword [edi + 0x350]
mov byte [edi + ecx*8 + 0x35], bl
movzx ebx, byte [eax + 6]
mov ecx, dword [edi + 0x350]
mov byte [edi + ecx*8 + 0x36], bl
movzx ebx, byte [eax + 7]
mov ecx, dword [edi + 0x350]
mov byte [edi + ecx*8 + 0x37], bl
inc dword [edi + 0x350]
mov ecx, dword [esp + 0x30]
movzx ecx, byte [ecx]
inc ebp
add eax, 0x50
cmp ebp, ecx
jl 0x1004ed72
test esi, esi
je 0x1004eeb4
mov eax, dword [edi + 0x350]
movzx ecx, byte [edi + eax*8 + 0x31]
lea eax, [edi + eax*8 + 0x31]
xor cl, dl
and cl, 0xf
xor byte [eax], cl
mov eax, dword [edi + 0x350]
movzx ecx, byte [edi + eax*8 + 0x31]
lea eax, [edi + eax*8 + 0x31]
xor cl, dl
and cl, 0xf
xor cl, dl
mov byte [eax], cl
mov edx, dword [edi + 0x350]
movzx eax, byte [esp + 0x3e]
mov byte [edi + edx*8 + 0x32], al
mov ecx, dword [edi + 0x350]
mov dl, byte [esp + 0x41]
mov byte [edi + ecx*8 + 0x35], dl
mov eax, dword [edi + 0x350]
movzx ecx, byte [esp + 0x42]
mov byte [edi + eax*8 + 0x36], cl
movzx eax, byte [esp + 0x43]
mov edx, dword [edi + 0x350]
mov byte [edi + edx*8 + 0x37], al
mov eax, edi
call fcn.1004fa20
jmp 0x1004ebd0
mov ebx, 0x80070057
jmp 0x1004ece7
lea esi, [esp + 0x18]
call fcn.10008990
lea esi, [esp + 0x1c]
call fcn.1000fee0
mov eax, 0x80004005
mov ecx, dword [esp + 0x254]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x238]
xor ecx, esp
call fcn.10062448
add esp, 0x24c
ret 4