Function at 0x1000d650
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x170
test byte [0x1001f098], 8
jne 0x1000d790
mov eax, dword [ebp + 8]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0x80000000
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CreateFileW]
sub esp, 0x1c
mov ebx, eax
cmp eax, 0xffffffff
je 0x1000d880
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileSize]
sub esp, 8
mov esi, eax
cmp eax, 0xffffffff
je 0x1000d750
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov edi, eax
test eax, eax
je 0x1000df02
lea eax, [ebp - 0x13c]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], esi
mov dword [esp + 4], edi
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_ReadFile]
sub esp, 0x14
test eax, eax
je 0x1000d71b
cmp dword [ebp - 0x13c], esi
je 0x1000d8a8
mov esi, 0x80004005
test byte [0x1001f098], 4
je 0x1000d768
mov dword [esp + 0xc], str.Failed_to_read_file_contents._n
mov dword [esp + 8], str.D3DCompileFromFile
mov dword [esp + 4], 0x1001f098
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_2
jmp 0x1000d768
mov eax, dword fs:[0x18]
mov esi, dword [eax + 0x34]
xor edi, edi
movzx eax, si
or eax, 0x80070000
test esi, esi
cmovg esi, eax
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, esi
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 0x24
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x1000de90
mov eax, dword [ebp + 0x18]
shr eax, 0x10
je 0x1000d950
mov eax, dword [ebp + 0x18]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrA]
mov dword [ebp - 0x148], 0x10024a68
sub esp, 8
test eax, eax
jne 0x1000d96a
mov edi, dword [ebp + 0x18]
cmp byte [edi], 0
je 0x1000dec8
mov ecx, edi
nop
mov edx, eax
lea eax, [eax + 1]
cmp byte [ecx + edx + 1], 0
jne 0x1000d7e0
mov ebx, dword [ebp + 0x18]
mov byte [ebp - 0x138], 0x22
lea ecx, [ebp - 0x137]
lea esi, [ebp - 0x15]
mov dword [ebp - 0x140], ebx
jmp 0x1000d845
cmp al, 9
je 0x1000dd48
cmp al, 0xa
jne 0x1000dd7f
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea esi, [esi]
lea eax, [edx - 1]
test edx, edx
jle 0x1000ddc8
cmp ecx, esi
ja 0x1000ddc8
mov edx, eax
add dword [ebp - 0x140], 1
mov eax, dword [ebp - 0x140]
movzx eax, byte [eax - 1]
cmp al, 0xd
je 0x1000dd60
jle 0x1000d810
cmp al, 0x22
je 0x1000ddb0
cmp al, 0x5c
jne 0x1000dd71
mov edi, 0x5c5c
add ecx, 2
mov word [ecx - 2], di
jmp 0x1000d830
mov eax, dword fs:[0x18]
mov esi, dword [eax + 0x34]
movzx eax, si
or eax, 0x80070000
test esi, esi
cmovg esi, eax
lea esp, [ebp - 0xc]
pop ebx
mov eax, esi
pop esi
pop edi
pop ebp
ret 0x24
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x138]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x10], edx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x104
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_WideCharToMultiByte]
mov eax, dword [ebp + 0x28]
lea edx, [ebp - 0x138]
sub esp, 0x20
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 0x24]
mov dword [esp + 4], esi
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 0x20]
mov dword [esp + 8], edx
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 0x1c]
mov dword [esp], edi
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0x18]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0xc], eax
call sym.d3dcompiler_46.dll_D3DCompile
sub esp, 0x2c
mov esi, eax
jmp 0x1000d768
movzx eax, word [ebp + 0x18]
mov dword [esp], 0x10024a5b
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0
mov dword [ebp - 0x148], eax
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x1000de80
mov eax, dword [ebp + 0x14]
shr eax, 0x10
je 0x1000de00
mov eax, dword [ebp + 0x14]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrA]
mov dword [ebp - 0x144], 0x10024a68
sub esp, 8
test eax, eax
jne 0x1000da92
mov edi, dword [ebp + 0x14]
cmp byte [edi], 0
je 0x1000dee8
mov ecx, edi
nop
lea esi, [esi]
mov edx, eax
lea eax, [eax + 1]
cmp byte [ecx + edx + 1], 0
jne 0x1000d9c0
mov ebx, dword [ebp + 0x14]
mov byte [ebp - 0x138], 0x22
lea ecx, [ebp - 0x137]
lea esi, [ebp - 0x15]
mov dword [ebp - 0x140], ebx
jmp 0x1000da1d
cmp al, 9
je 0x1000dce0
cmp al, 0xa
jne 0x1000dcff
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea esi, [esi]
lea eax, [edx - 1]
cmp ecx, esi
ja 0x1000da60
test edx, edx
jle 0x1000da60
mov edx, eax
add dword [ebp - 0x140], 1
mov eax, dword [ebp - 0x140]
movzx eax, byte [eax - 1]
cmp al, 0xd
je 0x1000dcc8
jle 0x1000d9f0
cmp al, 0x22
je 0x1000dd30
cmp al, 0x5c
jne 0x1000dcf1
mov edi, 0x5c5c
add ecx, 2
mov word [ecx - 2], di
jmp 0x1000da10
mov byte [ecx], 0x22
test eax, eax
jle 0x1000defa
mov edx, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], dx
mov byte [eax], 0
lea eax, [ebp - 0x138]
mov dword [esp], eax
call sym.___wine_dbg_strdup
mov dword [ebp - 0x144], eax
mov eax, dword [ebp + 8]
test eax, eax
je 0x1000de70
mov eax, dword [ebp + 8]
shr eax, 0x10
je 0x1000de20
mov eax, dword [ebp + 8]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, 0x10024a68
sub esp, 8
test eax, eax
jne 0x1000dbae
mov edi, dword [ebp + 8]
cmp word [edi], 0
je 0x1000dea0
mov ecx, edi
lea esi, [esi]
mov edx, eax
lea eax, [eax + 1]
cmp word [ecx + edx*2 + 2], 0
jne 0x1000dae0
mov ebx, 0x224c
lea ecx, [ebp - 0x136]
lea esi, [ebp - 0x16]
mov word [ebp - 0x138], bx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x140], ebx
jmp 0x1000db3d
cmp ax, 9
je 0x1000dc38
cmp ax, 0xa
jne 0x1000dc56
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea eax, [edx - 1]
test edx, edx
jle 0x1000db80
cmp ecx, esi
ja 0x1000db80
mov edx, eax
add dword [ebp - 0x140], 2
mov eax, dword [ebp - 0x140]
movzx eax, word [eax - 2]
cmp ax, 0xd
je 0x1000dc20
jbe 0x1000db10
cmp ax, 0x22
je 0x1000dcb0
cmp ax, 0x5c
jne 0x1000dc49
mov edi, 0x5c5c
add ecx, 2
mov word [ecx - 2], di
jmp 0x1000db30
mov byte [ecx], 0x22
test eax, eax
jle 0x1000deb9
mov esi, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], si
mov byte [eax], 0
lea eax, [ebp - 0x138]
mov dword [esp], eax
call sym.___wine_dbg_strdup
mov edx, eax
mov eax, dword [ebp + 0x28]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], str.filename__s__defines__p__include__p__entrypoint__s__target__s__flags1__x__flags2__x__code__p__errors__p._n
mov dword [esp + 0x30], eax
mov eax, dword [ebp + 0x24]
mov dword [esp + 8], str.D3DCompileFromFile
mov dword [esp + 0x2c], eax
mov eax, dword [ebp + 0x20]
mov dword [esp + 4], 0x1001f098
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 0x1c]
mov dword [esp], 3
mov dword [esp + 0x24], eax
mov eax, dword [ebp - 0x148]
mov dword [esp + 0x20], eax
mov eax, dword [ebp - 0x144]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x14], eax
call sym._wine_dbg_log.constprop.0_2
jmp 0x1000d669
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x1000db30
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x1000db30
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x1000de40
mov edi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr di, 0xc
movzx edi, di
movzx ebx, byte [edi + str.0123456789abcdef]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [edi + str.0123456789abcdef]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + str.0123456789abcdef]
and edi, 0xf
mov byte [ecx - 3], bl
movzx ebx, byte [edi + str.0123456789abcdef]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x1000db30
mov eax, 0x225c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x1000db30
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x1000da10
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x1000da10
lea edi, [eax - 0x20]
mov ebx, edi
cmp bl, 0x5e
jbe 0x1000de60
mov ebx, 0x785c
add ecx, 4
mov word [ecx - 4], bx
mov ebx, eax
and eax, 0xf
shr bl, 4
movzx eax, byte [eax + str.0123456789abcdef]
movzx edi, bl
movzx ebx, byte [edi + str.0123456789abcdef]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x1000da10
mov eax, 0x225c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x1000da10
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x1000d830
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x1000d830
lea edi, [eax - 0x20]
mov ebx, edi
cmp bl, 0x5e
jbe 0x1000de50
mov ebx, 0x785c
add ecx, 4
mov word [ecx - 4], bx
mov ebx, eax
and eax, 0xf
shr bl, 4
movzx eax, byte [eax + str.0123456789abcdef]
movzx edi, bl
movzx ebx, byte [edi + str.0123456789abcdef]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x1000d830
mov eax, 0x225c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x1000d830
mov byte [ecx], 0x22
test eax, eax
jle 0x1000deda
mov edx, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], dx
mov byte [eax], 0
lea eax, [ebp - 0x138]
mov dword [esp], eax
call sym.___wine_dbg_strdup
mov dword [ebp - 0x148], eax
jmp 0x1000d96a
movzx eax, word [ebp + 0x14]
mov dword [esp], 0x10024a5b
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0
mov dword [ebp - 0x144], eax
jmp 0x1000da92
movzx eax, word [ebp + 8]
mov dword [esp], 0x10024a5b
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0
mov edx, eax
jmp 0x1000dbae
mov byte [ecx], al
add ecx, 1
jmp 0x1000db30
mov byte [ecx], al
add ecx, 1
jmp 0x1000d830
mov byte [ecx], al
add ecx, 1
jmp 0x1000da10
mov edx, 0x10024a61
jmp 0x1000dbae
mov dword [ebp - 0x144], 0x10024a61
jmp 0x1000da92
mov dword [ebp - 0x148], 0x10024a61
jmp 0x1000d96a
mov byte [ebp - 0x136], 0x22
mov ecx, 0x224c
mov word [ebp - 0x138], cx
lea ecx, [ebp - 0x136]
lea eax, [ecx + 1]
jmp 0x1000db9b
mov eax, 0x2222
lea ecx, [ebp - 0x137]
mov word [ebp - 0x138], ax
lea eax, [ecx + 1]
jmp 0x1000dde3
mov edx, 0x2222
lea ecx, [ebp - 0x137]
mov word [ebp - 0x138], dx
lea eax, [ecx + 1]
jmp 0x1000da7b
mov esi, 0x8007000e
jmp 0x1000d768