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

Disassembly:
push 0xffffffffffffffff
push 0x100a1ac1
mov eax, dword fs:[0]
push eax
sub esp, 0x240
mov eax, dword [0x100d1040]
xor eax, esp
mov dword [esp + 0x238], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x100d1040]
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 closesocket
push eax
mov edi, edx
mov dword [esp + 0x58], eax
mov dword [esp + 0x48], ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [esp + 0x18], esi
mov dword [esp + 0x25c], 0
cmp esi, 0xffffffff
jne 0x100155e2
call fcn.10002c20
jmp 0x10015b11
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esp + 0x20], eax
cmp eax, 0xffffffff
jne 0x10015600
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10015b0c
cmp eax, 0xa00000
ja 0x1001576a
lea ebx, [eax + 2]
push 0x100d61b4
push ebx
call fcn.10057582
mov ebp, eax
add esp, 8
mov dword [esp + 0x1c], ebp
mov byte [esp + 0x25c], 1
test ebp, ebp
jne 0x1001563f
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x8007000e
jmp 0x10015b11
push ebx
push 0
push ebp
call fcn.10059a00
add esp, 0xc
xor ecx, ecx
push ecx
push ecx
push ecx
xor eax, eax
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x1001567e
call fcn.10002c20
mov edi, eax
lea esi, [esp + 0x1c]
call fcn.1004b720
lea esi, [esp + 0x18]
call fcn.1000fcc0
mov eax, edi
jmp 0x10015b11
mov eax, dword [esp + 0x20]
push 0
lea edx, [esp + 0x38]
push edx
push eax
push ebp
push esi
mov dword [esp + 0x48], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1001565e
mov eax, str.MEDIA_DESCRIPTOR
mov edx, ebp
mov ecx, 0x10
sub edx, eax
lea esp, [esp]
mov ebx, dword [eax + edx]
cmp ebx, dword [eax]
jne 0x10015761
sub ecx, 4
add eax, 4
cmp ecx, 4
jae 0x100156b0
mov bl, 2
cmp byte [ebp + 0x10], bl
jb 0x10015819
xor ecx, ecx
push 0x206
push ecx
lea edx, [esp + 0x4e]
push edx
mov word [esp + 0x50], cx
call fcn.10059a00
mov eax, dword [esp + 0x48]
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcpyW]
add esp, 0xc
push eax
lea ecx, [esp + 0x48]
push ecx
call ebp
lea edx, [esp + 0x44]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
push 0x100c456c
push eax
call ebp
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x10015790
push 0
push 0
push 3
push 0
push 1
push closesocket
lea ecx, [esp + 0x5c]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [esp + 0x20], esi
mov byte [esp + 0x25c], bl
cmp esi, 0xffffffff
jne 0x1001577b
call fcn.10002c20
lea esi, [esp + 0x20]
mov edi, eax
call fcn.1000fcc0
jmp 0x10015665
push ebp
call fcn.1005758d
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xe00e1001
jmp 0x10015b11
push esi
mov ecx, edi
call fcn.10016f50
test eax, eax
je 0x100157ac
lea esi, [esp + 0x20]
call fcn.1000fcc0
lea esi, [esp + 0x1c]
call fcn.1004b720
lea esi, [esp + 0x18]
call fcn.1000fcc0
mov eax, 0xe003200a
jmp 0x10015b11
mov eax, dword [esp + 0x2c]
xor ebx, ebx
cmp eax, ebx
je 0x100157be
lea edx, [esp + 0x44]
push edx
push eax
call ebp
lea eax, [esp + 0x24]
push eax
push esi
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x1001574c
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.1000fcc0
lea esi, [esp + 0x1c]
call fcn.1004b720
lea esi, [esp + 0x18]
call fcn.1000fcc0
xor eax, eax
jmp 0x10015b11
mov eax, dword [ebp + 0x50]
mov esi, dword [esp + 0x20]
lea edx, [eax + 0x18]
cmp edx, esi
ja 0x10015afa
cmp word [ebp + 0x14], 0
je 0x10015afa
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 0x10015afa
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 0x1001588e
lea ebx, [ebx]
cmp byte [esi + 4], 1
je 0x1001588e
inc ecx
add esi, 0x50
cmp ecx, edx
jl 0x10015880
cmp ecx, edx
jge 0x10015afa
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 0x10015912
lea eax, [esp + 0x20]
call fcn.100152c0
mov ebx, eax
test ebx, ebx
jl 0x10015917
cmp ebx, 1
je 0x10015917
mov edx, dword [esp + 0x20]
push edx
mov edx, dword [edi + 0x14]
mov eax, edi
call fcn.100164b0
mov ebx, eax
test ebx, ebx
jl 0x10015917
cmp ebx, 1
je 0x10015917
mov edx, dword [esi + 0x34]
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x24], edx
test esi, esi
je 0x10015953
cmp byte [ebp + 0x10], 1
jne 0x10015930
cmp byte [ebp + 0x11], 5
jb 0x10015930
mov eax, 1
jmp 0x10015932
mov ebx, 0x80004005
lea esi, [esp + 0x1c]
call fcn.1004b720
lea esi, [esp + 0x18]
call fcn.1000fcc0
mov eax, ebx
jmp 0x10015b11
xor eax, eax
mov ecx, dword [esp + 0x3c]
test ecx, ecx
je 0x10015af0
push eax
push edx
push ecx
mov ecx, ebp
call fcn.10015b40
mov ebx, eax
test ebx, ebx
jl 0x10015917
cmp ebx, 1
je 0x10015917
cmp dword [edi + 0x350], 0
jne 0x10015800
mov eax, 1
cmp dword [esp + 0x20], eax
jne 0x10015978
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 0x10015ae4
mov dl, byte [esp + 0x3d]
add eax, 4
mov cl, byte [eax]
cmp cl, 0xa2
jne 0x100159ce
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 0x10015a64
movzx ecx, word [eax + 0xc]
cmp ecx, dword [edi + 0x14]
jne 0x10015afa
mov ecx, dword [esp + 0x24]
cmp dword [eax + 0x30], ecx
jne 0x10015afa
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 0x100159a2
test esi, esi
je 0x10015ae4
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.100166c0
jmp 0x10015800
mov ebx, 0x80070057
jmp 0x10015917
lea esi, [esp + 0x1c]
call fcn.1004b720
lea esi, [esp + 0x18]
call fcn.1000fcc0
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.1005710f
add esp, 0x24c
ret 4