Function at 0x10173490
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov edx, dword [edi + 0x98]
mov esi, dword [edi + 0x58]
mov eax, dword [edi]
xor ecx, ecx
and dl, 0xc
xor ebx, ebx
add esi, 0x28
mov dword [ebp - 4], ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], eax
cmp dl, 4
je 0x101734ce
mov eax, dword [eax + 0x20]
and eax, 0x1000000
or eax, ecx
mov dword [ebp - 0x10], ecx
je 0x101734d5
mov dword [ebp - 0x10], 1
mov ecx, 8
mov eax, esi
call fcn.10143e80
mov ecx, 7
mov dword [edi + 0x78], ebx
cmp dword [edi + 0x28], ecx
jne 0x10173539
mov eax, dword [ebp - 0x18]
cmp byte [eax + 0x51], bl
jne 0x1017352d
cmp byte [eax + 0x52], bl
jne 0x1017352d
mov byte [eax + 0x51], 1
cmp dword [eax + 0xbc], ebx
jle 0x10173511
mov dword [eax + 0x120], 1
inc dword [eax + 0x128]
xor edx, edx
mov word [eax + 0x12c], dx
mov eax, dword [eax + 0xf4]
test eax, eax
je 0x1017352d
mov dword [eax + 0xc], ecx
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x6c]
mov dword [ebp - 8], eax
cmp dword [ebp - 0x10], ebx
je 0x1017359e
mov edi, dword [edi + 0x58]
add edi, 0x168
test byte [edi + 8], 0x10
mov dword [ebp - 0x14], edi
je 0x10173564
mov edx, dword [edi + 0xc]
mov ebx, dword [edi + 0x10]
shr edx, 2
mov dword [ebp - 4], edx
jmp 0x10173566
mov edx, ebx
xor ecx, ecx
xor edi, edi
xor eax, eax
cmp edx, 2
jl 0x1017358c
mov edx, dword [ebx + eax*4]
add ecx, dword [edx + 4]
mov edx, dword [ebx + eax*4 + 4]
add edi, dword [edx + 4]
mov edx, dword [ebp - 4]
add eax, 2
dec edx
cmp eax, edx
jl 0x10173571
mov edx, dword [ebp - 4]
cmp eax, edx
jge 0x10173599
mov eax, dword [ebx + eax*4]
mov edx, dword [eax + 4]
add dword [ebp - 8], edx
add ecx, edi
add dword [ebp - 8], ecx
mov edx, dword [ebp + 8]
mov edi, dword [edx + 0x24]
lea eax, [edi + 1]
mov dword [edx + 0x24], eax
cmp edi, dword [ebp - 8]
jge 0x101736aa
mov eax, dword [edx + 0x6c]
cmp edi, eax
jge 0x101735c5
mov eax, dword [edx + 0x68]
lea ecx, [edi + edi*2]
lea ecx, [eax + ecx*8]
jmp 0x101735eb
sub edi, eax
mov eax, dword [ebx]
mov eax, dword [eax + 4]
xor ecx, ecx
cmp edi, eax
jl 0x101735e0
sub edi, eax
mov eax, dword [ebx + ecx*4 + 4]
mov eax, dword [eax + 4]
inc ecx
cmp edi, eax
jge 0x101735d2
mov ecx, dword [ebx + ecx*4]
mov ecx, dword [ecx]
lea eax, [edi + edi*2]
lea ecx, [ecx + eax*8]
cmp dword [ebp - 0x10], 0
mov dword [ebp - 0xc], ecx
je 0x1017367c
cmp byte [ecx + 1], 0xfc
jne 0x1017367c
mov edx, dword [ebp - 4]
lea eax, [edx*4 + 4]
mov dword [ebp - 0x1c], eax
xor eax, eax
test edx, edx
jle 0x10173623
mov edx, dword [ecx + 0x10]
cmp dword [ebx + eax*4], edx
je 0x10173623
inc eax
cmp eax, dword [ebp - 4]
jl 0x10173615
cmp eax, dword [ebp - 4]
jne 0x10173679
mov eax, dword [ebp - 0x1c]
xor ecx, ecx
cmp dword [ebp - 4], ecx
setne cl
push ecx
mov ecx, dword [ebp - 0x14]
call fcn.1015b920
mov edx, dword [ebp + 8]
add esp, 4
mov dword [edx + 0x28], eax
test eax, eax
jne 0x101736bf
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x10]
mov ecx, dword [ebp - 4]
mov ebx, dword [eax + 0x10]
mov dword [ebx + ecx*4], edx
or word [eax + 8], 0x10
mov edx, dword [ebp - 0xc]
inc ecx
mov dword [ebp - 4], ecx
add ecx, ecx
add ecx, ecx
mov dword [eax + 0xc], ecx
mov eax, dword [edx + 0x10]
mov ecx, dword [eax + 4]
add dword [ebp - 8], ecx
mov ecx, edx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x98]
and al, 0xc
cmp al, 8
jb 0x101736cd
mov al, byte [ecx]
cmp al, 0xae
je 0x101736cd
cmp al, 0x3e
jne 0x10173698
cmp dword [edx + 0x24], 1
jg 0x101736cd
mov edi, dword [edx + 0x24]
lea ecx, [edi + 1]
mov dword [edx + 0x24], ecx
cmp edi, dword [ebp - 8]
jl 0x101735b3
mov edi, 0x65
mov dword [edx + 0x28], 0
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, 1
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x120]
test eax, eax
je 0x1017370c
mov dword [edx + 0x28], 9
mov ecx, dword [str.interrupted]
mov edi, 1
mov eax, str.unknown_error
test ecx, ecx
je 0x101736f7
mov eax, ecx
mov esi, dword [ebp + 8]
push eax
call fcn.1015e160
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [edx + 0x98]
and dl, 0xc
cmp dl, 4
jne 0x10173760
mov eax, 4
mov word [esi + 8], ax
mov eax, edi
cdq
mov dword [esi + 4], edx
mov dword [esi], eax
mov edx, 0xa02
mov word [esi + 0x30], dx
movzx eax, byte [ecx]
mov eax, dword [eax*4 + 0x1026d9c0]
mov dword [esi + 0x38], eax
test eax, eax
je 0x10173756
lea edi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x10173748
sub eax, edi
and eax, 0x3fffffff
mov dword [esi + 0x34], eax
mov byte [esi + 0x32], 1
add esi, 0x50
mov edx, 4
mov word [esi + 8], dx
mov eax, dword [ecx + 4]
cdq
mov dword [esi], eax
mov dword [esi + 4], edx
mov eax, 4
mov word [esi + 0x30], ax
mov eax, dword [ecx + 8]
cdq
mov dword [esi + 0x2c], edx
mov dword [esi + 0x28], eax
mov edx, 4
mov word [esi + 0x58], dx
mov eax, dword [ecx + 0xc]
cdq
mov dword [esi + 0x50], eax
mov dword [esi + 0x54], edx
add esi, 0x78
mov eax, 0x64
cmp dword [esi + 0x18], eax
jge 0x10173800
push 0
mov ecx, esi
call fcn.1015b920
add esp, 4
test eax, eax
jne 0x1017352d
mov edx, dword [esi + 0x10]
mov eax, dword [ebp - 0xc]
mov ecx, 0x202
mov word [esi + 8], cx
mov ecx, dword [esi + 0x18]
call fcn.1015b420
mov ecx, eax
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x14], ecx
cmp ecx, eax
je 0x101738cd
mov dword [esi + 0xc], 0
test ecx, ecx
jne 0x1017381b
mov edx, 0x2400
test word [esi + 8], dx
je 0x1017380d
call fcn.1013fb30
jmp 0x101738e9
mov eax, dword [esi + 0x14]
and word [esi + 8], 0x2d
mov dword [esi + 0x10], eax
jmp 0x101737b9
mov eax, 1
mov word [esi + 8], ax
jmp 0x101738e9
mov eax, ecx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10173820
sub eax, edx
and eax, 0x7fffffff
mov ecx, 0x2400
mov ebx, eax
mov edi, 0x202
test word [esi + 8], cx
jne 0x10173846
cmp dword [esi + 0x18], 0
je 0x1017384d
mov eax, esi
call fcn.10141d40
mov ecx, dword [ebp - 0x14]
xor edx, edx
mov dword [esi + 0x10], ecx
cmp edx, 0x101209d0
jne 0x101738bc
mov eax, dword [esi + 0x20]
mov dword [esi + 0x14], ecx
test eax, eax
je 0x101738a3
cmp ecx, dword [eax + 0x15c]
jae 0x101738a3
cmp ecx, dword [eax + 0x154]
jb 0x10173888
mov eax, 0x80
mov dword [esi + 0x18], eax
mov dword [esi + 0xc], ebx
mov word [esi + 8], di
jmp 0x101738e5
cmp ecx, dword [eax + 0x158]
jb 0x101738a3
movzx eax, word [eax + 0x12e]
mov dword [esi + 0x18], eax
mov dword [esi + 0xc], ebx
mov word [esi + 8], di
jmp 0x101738e5
mov eax, dword [ebp - 0x14]
push eax
call dword [0x10292454]
add esp, 4
mov dword [esi + 0x18], eax
mov dword [esi + 0xc], ebx
mov word [esi + 8], di
jmp 0x101738e5
mov edi, 0xa02
mov dword [esi + 0x24], edx
mov dword [esi + 0xc], ebx
mov word [esi + 8], di
jmp 0x101738e5
test eax, eax
je 0x101738e2
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x101738d4
sub eax, edx
and eax, 0x3fffffff
mov dword [esi + 0xc], eax
mov byte [esi + 0xa], 1
mov edi, dword [ebp + 8]
mov ecx, dword [edi + 0x98]
and cl, 0xc
cmp cl, 4
jne 0x10173994
mov eax, 4
cmp dword [esi + 0x40], eax
jge 0x101739d1
push 0
lea ecx, [esi + 0x28]
call fcn.1015b920
add esp, 4
test eax, eax
jne 0x1017352d
mov ebx, dword [ebp - 0xc]
mov edx, dword [esi + 0x38]
mov eax, 0x202
mov word [esi + 0x30], ax
mov dword [esi + 0x34], 2
movzx ecx, word [ebx + 2]
push ecx
push str._.2x
push edx
push 3
call sym.SQLite.Interop.dll_sqlite3_snprintf
mov eax, 0x1f4
add esp, 0x10
mov byte [esi + 0x32], 1
cmp dword [esi + 0x68], eax
jge 0x101739e1
push 0
lea ecx, [esi + 0x50]
call fcn.1015b920
add esp, 4
test eax, eax
jne 0x1017352d
mov edx, dword [ebp - 0x14]
mov ecx, 0x202
mov word [esi + 0x58], cx
push edx
mov edx, dword [esi + 0x60]
mov ecx, ebx
call fcn.1013b810
add esp, 4
mov dword [esi + 0x5c], eax
mov byte [esi + 0x5a], 1
mov eax, dword [edi + 0x98]
mov edx, dword [edi + 0x58]
shr eax, 2
and eax, 3
dec eax
mov ecx, 2
sub ecx, eax
add ecx, ecx
add ecx, ecx
add edx, 0x28
mov word [edi + 0x90], cx
mov dword [edi + 0x78], edx
mov dword [edi + 0x28], 0
mov edi, 0x64
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esi + 0x3c]
and word [esi + 0x30], 0x2d
mov dword [esi + 0x38], edx
jmp 0x10173921
mov eax, dword [esi + 0x64]
and word [esi + 0x58], 0x2d
mov dword [esi + 0x60], eax
jmp 0x10173973