Function at 0x10002800
Capabilities:
Get process heap flags

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff8
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x24
mov eax, dword [ecx]
mov ebx, dword [ecx + 4]
mov dword [ebp - 0x1c], eax
test byte [0x10005018], 8
jne 0x10002a60
cmp word [0x1000901c], 0
je 0x10002a40
mov edi, dword [section..bss]
test edi, edi
je 0x100029e0
mov edx, dword [0x10009008]
test edx, edx
je 0x10002a0c
xor edi, edi
cmp byte [ebx + 0x7a], 0
je 0x100028bf
test edx, edx
jle 0x100028bf
mov eax, dword [0x10009004]
lea ecx, [ebx + 0x7a]
xor esi, esi
mov dword [ebp - 0x14], edx
mov edx, edi
mov dword [ebp - 0x20], ebx
mov edi, esi
mov ebx, ecx
mov esi, edx
mov dword [ebp - 0x18], eax
xor eax, eax
jmp 0x1000288d
add esi, 1
movzx eax, si
cmp dword [ebp - 0x14], eax
mov edi, eax
jle 0x100028ab
mov edx, dword [ebp - 0x18]
lea eax, [eax + eax*4]
mov dword [esp + 4], ebx
shl eax, 5
lea eax, [edx + eax + 0x7e]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_strcmp]
test eax, eax
jne 0x10002880
mov edx, dword [ebp - 0x14]
mov eax, esi
mov esi, edi
mov ebx, dword [ebp - 0x20]
movzx edi, ax
xor eax, eax
cmp edx, esi
cmove edi, eax
mov eax, dword fs:[0x18]
mov dword [ebp - 0x14], eax
mov dword [esp + 8], 0xb8
mov dword [esp + 4], 0
mov eax, dword [eax + 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 0x10002bea
mov eax, dword [0x10009004]
lea edi, [edi + edi*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 0x10002b38
mov dword [esi + 0xa0], eax
mov dword [esp + 4], str.DS_Entry
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov ecx, dword [0x10009018]
sub esp, 8
mov dword [esi + 0xa4], eax
lea edi, [ecx + 1]
mov dword [ebx], ecx
mov dword [0x10009018], edi
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0x401
mov dword [esp + 8], 3
mov dword [esp + 4], 1
mov ecx, dword [ebp - 0x1c]
mov dword [esp], ecx
call eax
sub esp, 0x14
mov edi, eax
test ax, ax
jne 0x10002ac8
mov eax, dword [0x10009024]
add ebx, 0x7a
mov dword [esi], eax
mov eax, dword [ebx - 0x7a]
mov dword [esi + 4], eax
lea eax, [esi + 0x7e]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_strcpy]
lea eax, [esi + 0xa8]
mov dword [esi + 0xb0], 0
movd xmm0, eax
xor eax, eax
mov dword [0x10009024], esi
mov word [0x10009028], ax
punpckldq xmm0, xmm0
mov eax, edi
movq qword [esi + 0xa8], xmm0
mov dword [esi + 0xb4], 0
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov dword [section..bss], 1
mov eax, str.sane.ds
call fcn.100017b0
mov eax, str.gphoto2.ds
call fcn.100017b0
mov edx, dword [0x10009008]
test edx, edx
jne 0x10002853
test byte [0x10005018], 1
jne 0x10002b08
mov esi, 3
mov word [0x10009028], si
lea esp, [ebp - 0x10]
mov edi, 1
pop ecx
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
test byte [0x10005018], 1
jne 0x10002b80
mov eax, 0xb
mov word [0x10009028], ax
jmp 0x10002a25
mov dword [esp + 0xc], str.DG_CONTROL_DAT_IDENTITY_MSG_OPENDS_n
mov dword [esp + 8], str.TWAIN_OpenDS
mov dword [esp + 4], 0x10005018
mov dword [esp], 3
call fcn.10001760
test byte [0x10005018], 8
je 0x10002829
mov dword [esp + 0xc], str.pIdentity_is__s_n
lea ecx, [ebx + 0x7a]
mov dword [esp + 8], str.TWAIN_OpenDS
mov dword [esp + 0x10], ecx
mov dword [esp + 4], 0x10005018
mov dword [esp], 3
call fcn.10001760
jmp 0x10002829
mov edx, 5
mov word [0x10009028], dx
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub dword [0x10009018], 1
sub esp, 0xc
jmp 0x10002a25
mov dword [esp + 0xc], str.no_devs._n
mov dword [esp + 8], str.TWAIN_OpenDS
mov dword [esp + 4], 0x10005018
mov dword [esp], 0
call fcn.10001760
jmp 0x10002a19
test byte [0x10005018], 2
jne 0x10002bb0
mov ecx, 5
mov word [0x10009028], cx
mov eax, dword fs:[0x18]
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
jmp 0x10002a25
mov dword [esp + 0xc], str.seq_error_n
mov dword [esp + 8], str.TWAIN_OpenDS
mov dword [esp + 4], 0x10005018
mov dword [esp], 0
call fcn.10001760
jmp 0x10002a4d
mov eax, dword [0x10009004]
mov eax, dword [eax + edi]
call fcn.10001480
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], 0x10005018
mov dword [esp], 1
call fcn.10001760
jmp 0x10002b41
mov word [0x10009028], 2
test byte [0x10005018], 1
je 0x10002a25
xor ebx, ebx
mov dword [esp + 0xc], str.Out_of_memory._n
mov dword [esp + 8], str.TWAIN_OpenDS
mov dword [esp + 4], 0x10005018
mov dword [esp], ebx
call fcn.10001760
jmp 0x10002a25