Function at 0x65c41fd0
Capabilities:
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
test byte [0x65c45060], 8
jne 0x65c42220
cmp word [0x65c45020], 0
je 0x65c421f8
mov esi, dword [0x65c4508c]
test esi, esi
je 0x65c421a0
mov ebx, dword [0x65c45124]
test ebx, ebx
je 0x65c421cc
mov eax, dword [ebp + 0xc]
xor edi, edi
cmp byte [eax + 0x7a], 0
je 0x65c4207d
test ebx, ebx
jle 0x65c4207d
mov eax, dword [0x65c45090]
xor esi, esi
mov ecx, edi
mov edi, esi
mov esi, ebx
mov ebx, ecx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0xc]
add eax, 0x7a
mov dword [ebp - 0x20], eax
xor eax, eax
jmp 0x65c4204a
inc ebx
movzx eax, bx
mov edi, eax
cmp esi, eax
jle 0x65c4206b
mov ecx, dword [ebp - 0x1c]
lea eax, [eax + eax*4]
mov edx, dword [ebp - 0x20]
shl eax, 5
lea eax, [ecx + eax + 0x7e]
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_strcmp]
test eax, eax
jne 0x65c42040
mov eax, ebx
mov ebx, esi
mov esi, edi
cmp ebx, esi
mov edi, eax
mov eax, 0
cmove edi, eax
mov dword [esp + 8], 0xb8
mov dword [esp + 4], 0
mov ebx, dword fs:[0x18]
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
mov esi, eax
test eax, eax
je 0x65c423ba
movzx edx, di
mov eax, dword [0x65c45090]
lea edi, [edx + edx*4]
shl edi, 5
mov eax, dword [eax + edi]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_LoadLibraryW]
sub esp, 4
test eax, eax
je 0x65c42300
mov dword [esi + 0xa0], eax
mov dword [esp + 4], str.DS_Entry
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov dword [esi + 0xa4], eax
mov edx, eax
mov eax, dword [0x65c45028]
sub esp, 8
lea ecx, [eax + 1]
mov dword [0x65c45028], ecx
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], 0x401
mov dword [esp + 8], 3
mov dword [esp + 4], 1
mov dword [esp], eax
call edx
sub esp, 0x14
mov edi, eax
test ax, ax
jne 0x65c42288
mov eax, dword [0x65c45080]
mov dword [esi], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov dword [esi + 4], eax
mov eax, dword [ebp + 0xc]
add eax, 0x7a
mov dword [esp + 4], eax
lea eax, [esi + 0x7e]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_strcpy]
lea eax, [esi + 0xa8]
mov dword [esi + 0xb0], 0
mov dword [esi + 0xac], eax
mov dword [esi + 0xa8], eax
xor eax, eax
mov dword [esi + 0xb4], 0
mov dword [0x65c45080], esi
mov word [0x65c4502c], ax
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [0x65c4508c], 1
mov eax, str.sane.ds
call sym._twain_add_onedriver
mov eax, str.gphoto2.ds
call sym._twain_add_onedriver
mov ebx, dword [0x65c45124]
test ebx, ebx
jne 0x65c42010
test byte [0x65c45060], 1
jne 0x65c422d0
mov ebx, 3
mov edi, 1
mov word [0x65c4502c], bx
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [0x65c45060], 1
jne 0x65c42350
mov edi, 0xb
mov word [0x65c4502c], di
lea esp, [ebp - 0xc]
mov edi, 1
pop ebx
mov eax, edi
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0xc], str.DG_CONTROL_DAT_IDENTITY_MSG_OPENDS_n
mov dword [esp + 8], str.TWAIN_OpenDS
mov dword [esp + 4], 0x65c45060
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
test byte [0x65c45060], 8
je 0x65c41fe6
mov eax, dword [ebp + 0xc]
mov dword [esp + 0xc], str.pIdentity_is__s_n
mov dword [esp + 8], str.TWAIN_OpenDS
add eax, 0x7a
mov dword [esp + 4], 0x65c45060
mov dword [esp + 0x10], eax
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x65c41fe6
mov dword [esp + 8], esi
mov edx, 5
mov edi, 1
mov dword [esp + 4], 0
mov eax, dword [ebx + 0x30]
mov word [0x65c4502c], dx
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
dec dword [0x65c45028]
mov eax, edi
sub esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0xc], str.no_devs._n
mov dword [esp + 8], str.TWAIN_OpenDS
mov dword [esp + 4], 0x65c45060
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0
jmp 0x65c421d9
test byte [0x65c45060], 2
jne 0x65c42380
mov dword [esp + 8], esi
mov ecx, 5
mov edi, 1
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov word [0x65c4502c], cx
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov eax, edi
sub esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0xc], str.seq_error_n
mov dword [esp + 8], str.TWAIN_OpenDS
mov dword [esp + 4], 0x65c45060
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0
jmp 0x65c42205
mov eax, dword [0x65c45090]
mov eax, dword [eax + edi]
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0xc], str.Failed_to_load_TWAIN_Source__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.TWAIN_OpenDS
mov dword [esp + 4], 0x65c45060
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x65c42309
mov word [0x65c4502c], 2
mov edi, 1
test byte [0x65c45060], 1
je 0x65c421ea
mov dword [esp + 0xc], str.Out_of_memory._n
mov dword [esp + 8], str.TWAIN_OpenDS
mov dword [esp + 4], 0x65c45060
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0
jmp 0x65c421ea