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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x40
mov esi, dword [ebp + 0x14]
mov ebx, dword [ebp + 0x18]
test byte [0x10004018], 8
jne 0x10001f80
test esi, esi
je 0x10001e0d
test byte [0x10004018], 1
jne 0x10001f30
mov dword [esp], 0x10004080
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
sub esp, 4
test ebx, ebx
je 0x10001e2a
cmp dword [ebx], 0xc
je 0x10001fd8
mov eax, dword [0x10004158]
mov dword [esp], eax
mov eax, dword [sym.imp.ucrtbase.dll_free]
mov dword [ebp - 0x18], eax
call eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
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_CreateFileA]
sub esp, 0x1c
mov ebx, eax
cmp eax, 0xffffffff
je 0x100020b0
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileSize]
sub esp, 8
mov dword [ebp - 0x14], eax
mov dword [esp], eax
mov eax, dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x1c], eax
call eax
mov esi, eax
test eax, eax
je 0x1000209c
lea eax, [ebp - 0x10]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 4], esi
mov dword [esp + 8], eax
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_ReadFile]
sub esp, 0x14
mov edi, eax
test eax, eax
je 0x10001f60
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x10]
je 0x100020c8
mov dword [esp], ebx
xor edi, edi
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [ebp - 0x18]
sub esp, 4
mov dword [esp], esi
call eax
mov dword [0x10004158], 0
mov dword [esp], 0x10004080
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
sub esp, 4
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret 0x14
mov dword [esp + 0xc], str.callbacks_not_supported_n
mov dword [esp + 8], str.JSPROXY_InternetInitializeAutoProxyDll
mov dword [esp + 4], 0x10004018
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0
jmp 0x10001e0d
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [ebp - 0x18]
sub esp, 4
mov dword [esp], esi
call eax
mov dword [0x10004158], 0
jmp 0x10001f10
mov eax, dword [ebp + 0x10]
call sym._wine_dbgstr_an.constprop.0
mov edi, eax
mov eax, dword [ebp + 0xc]
call sym._wine_dbgstr_an.constprop.0
mov dword [esp + 0x20], ebx
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], edi
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str._lu___s___s___p___p_n
mov dword [esp + 8], str.JSPROXY_InternetInitializeAutoProxyDll
mov dword [esp + 4], 0x10004018
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x10001dfc
mov eax, dword [ebx + 4]
test eax, eax
je 0x10001e2a
mov edi, dword [ebx + 8]
test edi, edi
je 0x10002180
mov eax, dword [0x10004158]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
mov esi, dword [ebx + 4]
test esi, esi
je 0x100020b0
mov ecx, dword [ebx + 8]
mov edx, dword [sym.imp.kernel32.dll_MultiByteToWideChar]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], edx
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov dword [esp], 0
call edx
sub esp, 0x18
lea edi, [eax + eax + 2]
mov dword [ebp - 0x14], eax
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_malloc]
mov ebx, eax
test eax, eax
je 0x100020b0
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x1c]
mov dword [esp + 8], esi
xor esi, esi
mov dword [esp + 0x10], ebx
mov edx, dword [ebp - 0x18]
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], ecx
mov dword [esp + 4], 0
mov dword [esp], 0
call edx
mov word [ebx + edi - 2], si
mov edi, 1
mov dword [0x10004158], ebx
sub esp, 0x18
jmp 0x10001f10
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
push ecx
lea esi, cs:[esi]
nop
mov dword [0x10004158], 0
xor edi, edi
jmp 0x10001f10
mov ecx, dword [sym.imp.kernel32.dll_MultiByteToWideChar]
mov eax, dword [ebp - 0x14]
mov dword [esp + 8], esi
mov dword [esp + 0x14], 0
mov dword [ebp - 0x28], ecx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0
mov dword [esp], 0
call ecx
mov edx, eax
sub esp, 0x18
lea eax, [eax + eax + 2]
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x20], eax
mov dword [esp], eax
mov eax, dword [ebp - 0x1c]
call eax
mov edx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x28]
test eax, eax
mov edi, eax
je 0x10001f60
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 0x14], edx
mov dword [esp + 0xc], eax
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov dword [esp], 0
call ecx
mov eax, dword [ebp - 0x20]
xor edx, edx
sub esp, 0x18
mov word [edi + eax - 2], dx
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [ebp - 0x18]
sub esp, 4
mov dword [esp], esi
call eax
mov dword [0x10004158], edi
mov edi, 1
jmp 0x10001f10
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0x57
xor edi, edi
mov dword [esp], 0x10004080
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
sub esp, 4
jmp 0x10001f20