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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x80
mov dword [esp + 0x18], edx
mov ebx, dword [ebp + 0xc]
mov eax, dword [0x101d2014]
xor eax, ebp
mov dword [esp + 0x78], eax
mov dword [esp + 0x68], ebx
cmp byte [ecx], 4
je 0x1003dbba
mov esi, dword [ecx + 8]
mov edx, ecx
mov eax, dword [esi + 4]
mov dword [esp + 0x34], eax
mov al, byte [ecx + 1]
test al, 0x20
jne 0x1003d766
mov eax, dword [edx + 0x70]
mov ecx, dword [ebp + 8]
mov dword [esp + 4], edx
test eax, eax
je 0x1003d555
and ecx, 2
or ecx, ebx
jne 0x1003d447
mov edi, dword [esp + 0x18]
movzx ecx, word [edi + 0x18]
test cx, cx
je 0x1003dbd5
lea edx, [esp + 0x40]
mov dword [edx], eax
mov eax, dword [edi + 0x14]
lea edi, [esp + 0x68]
mov dword [edx + 4], eax
xor eax, eax
cmp dword [ebp + 8], 0
mov word [edx + 8], cx
mov ecx, dword [esp + 4]
mov byte [edx + 0xe], 0
setne al
xor esi, esi
mov dword [edx + 0xa], esi
push edi
push eax
push esi
push esi
call fcn.1003b8d0
add esp, 0x10
mov edi, eax
test eax, eax
mov dword [esp + 0x6c], eax
jne 0x1003d540
mov ebx, dword [esp + 0x68]
test ebx, ebx
mov ebx, dword [esp + 0x18]
je 0x1003d620
mov eax, dword [esp + 4]
mov edx, dword [eax + 0x74]
cmp dword [edx + 0x14], 0
mov dword [esp + 8], edx
js 0x1003d8da
mov eax, dword [esp + 0x34]
movzx esi, byte [edx + 0xa]
cmp byte [edx + 2], 0
mov eax, dword [eax + 0x54]
mov dword [esp + 0xc], eax
jne 0x1003d5c1
mov ecx, dword [ebx]
mov ebx, dword [ebx + 8]
cmp ebx, 0x7f
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], ecx
ja 0x1003d664
mov byte [eax + esi], bl
inc esi
mov edi, esi
mov esi, ebx
movzx ecx, word [edx + 0xe]
lea ebx, [eax + edi]
cmp esi, ecx
jg 0x1003d903
add edi, esi
mov eax, 4
cmp edi, 3
mov ecx, edi
mov edi, esi
mov esi, dword [esp + 0x1c]
cmovg eax, ecx
mov dword [esp + 0x20], eax
push esi
push dword [esp + 0x18]
push ebx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
sub edi, esi
jne 0x1003dbc2
mov esi, dword [esp + 4]
mov dword [esp + 0x6c], 0
cmp dword [esp + 0x68], 0
mov ecx, dword [esp + 8]
movzx edx, word [esi + 0x46]
je 0x1003d694
jns 0x1003d511
cmp word [ecx + 0x18], 0
je 0x1003d511
inc edx
mov word [esi + 0x46], dx
and byte [esi + 1], 0xfd
movzx edx, dx
lea eax, [esp + 0x6c]
xor ebx, ebx
mov edi, ecx
push eax
push ebx
push ebx
push dword [esp + 0x2c]
push dword [esp + 0x1c]
call fcn.10044d50
add esp, 0x14
mov word [esi + 0x32], 0
cmp byte [edi + 0xc], 0
jne 0x1003d7be
mov edi, dword [esp + 0x6c]
mov ecx, dword [esp + 0x78]
xor ecx, ebp
call fcn.10192ef0
mov eax, edi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
cmp byte [esi + 0xb], 0
jne 0x1003dbfa
mov edx, dword [esp + 4]
test byte [edx + 1], 2
je 0x1003d581
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx + 8]
mov ecx, dword [ecx + 0xc]
xor ecx, dword [edx + 0x24]
xor eax, dword [edx + 0x20]
or eax, ecx
je 0x1003d849
test ebx, ebx
mov ebx, dword [esp + 0x18]
jne 0x1003d453
xor eax, eax
cmp dword [ebp + 8], 0
mov ecx, dword [esp + 4]
lea esi, [esp + 0x68]
setne al
xor edx, edx
push esi
push eax
push dword [ebx + 0xc]
push dword [ebx + 8]
call fcn.1003b8d0
add esp, 0x10
test eax, eax
mov dword [esp + 0x6c], eax
je 0x1003d453
jmp 0x1003d65d
mov edx, dword [ebx + 0x10]
mov ecx, dword [ebx + 0x1c]
mov ebx, dword [ebx + 0x20]
add ebx, ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], edx
cmp ebx, 0x7f
mov dword [esp + 0x28], ebx
ja 0x1003d876
mov byte [eax + esi], bl
inc esi
mov edi, esi
mov esi, eax
mov eax, dword [esp + 0x18]
mov ecx, 0x7f
xor ebx, ebx
mov edx, dword [eax + 8]
mov eax, dword [eax + 0xc]
cmp ecx, edx
mov ecx, 0
sbb ecx, eax
lea ecx, [esi + edi]
jb 0x1003dc4e
inc edi
mov byte [ecx], dl
mov edx, dword [esp + 8]
mov eax, dword [esp + 0xc]
mov esi, dword [esp + 0x28]
jmp 0x1003d49f
mov esi, dword [esp + 4]
mov ecx, esi
call fcn.1002a650
mov ecx, dword [esi + 0x24]
mov eax, dword [esi + 0x20]
mov edx, dword [ebx + 8]
xor ecx, dword [ebx + 0xc]
xor edx, eax
or edx, ecx
jne 0x1003d453
mov ecx, dword [ebx]
lea edx, [esp + 0x40]
mov dword [edx + 0x10], ecx
mov ecx, dword [esp + 4]
mov dword [edx + 0x1c], eax
mov dword [edx + 0x20], 0
call fcn.10044940
mov edi, eax
jmp 0x1003d540
lea ecx, [eax + esi]
mov eax, ebx
cmp ebx, 0x3fff
ja 0x1003dba0
shr eax, 7
mov edi, 2
or al, 0x80
mov byte [ecx], al
mov ah, bl
and ah, 0x7f
mov byte [ecx + 1], ah
mov eax, dword [esp + 0xc]
add edi, esi
jmp 0x1003d49d
mov ecx, dword [ecx + 0x48]
mov dword [esp + 0x14], edx
mov eax, dword [ecx + 0x14]
test byte [ecx + 0x1c], 4
je 0x1003d8b3
mov edx, dword [eax + 0x18]
cmp edx, dword [ecx + 0x18]
mov edx, dword [esp + 8]
jb 0x1003d8b3
cmp dword [eax + 0x60], 0
je 0x1003d8a6
call fcn.1001ee10
mov edx, dword [esp + 8]
mov edi, eax
test eax, eax
mov dword [esp + 0x6c], eax
jne 0x1003d540
mov eax, dword [edx + 0x38]
mov ecx, dword [esp + 0x14]
movzx esi, word [edx + 0x1a]
mov dword [esp + 0x1c], eax
mov eax, dword [edx + 0x40]
movzx eax, word [eax + ecx*2]
push eax
call sub.api_ms_win_crt_utility_l1_1_0.dll__byteswap_ushort
mov ecx, dword [esp + 0xc]
add esp, 4
mov edi, eax
and edi, esi
add edi, dword [esp + 0x1c]
cmp byte [ecx + 8], 0
je 0x1003db31
lea ebx, [esp + 0x40]
mov esi, ecx
mov edx, edi
push ebx
call fcn.10043150
add esp, 4
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 4]
and byte [eax + 1], 0xfb
movzx eax, word [ebx + 0x12]
cmp dword [esp + 0x20], eax
je 0x1003db3e
mov edx, dword [esp + 0x14]
lea edi, [esp + 0x6c]
mov ecx, esi
push edi
push eax
call fcn.10044c30
add esp, 8
mov edi, dword [edi]
test edi, edi
jne 0x1003d540
mov ecx, esi
mov esi, dword [esp + 4]
mov edx, dword [esp + 0x14]
jmp 0x1003d511
mov ecx, dword [esp + 0x34]
mov edi, edx
mov ecx, dword [ecx + 8]
test ecx, ecx
je 0x1003d78e
mov edx, dword [edi + 0x40]
cmp ecx, edi
je 0x1003d783
test edx, edx
je 0x1003d7a2
cmp dword [ecx + 0x40], edx
je 0x1003d7a2
mov ecx, dword [ecx + 0x18]
test ecx, ecx
jne 0x1003d776
test edi, edi
je 0x1003d793
and al, 0xdf
mov byte [edi + 1], al
mov edx, edi
mov dword [esp + 0x6c], 0
jmp 0x1003d3d5
push edi
call fcn.1002a340
add esp, 4
mov edx, edi
test eax, eax
mov dword [esp + 0x6c], eax
je 0x1003d3d5
jmp 0x1003d65d
and byte [esi + 1], 0xfd
mov ecx, esi
call fcn.10045100
mov dword [esp + 0x6c], eax
mov edi, eax
mov eax, dword [esi + 0x74]
mov byte [eax + 0xc], 0
mov eax, dword [ebp + 8]
mov byte [esi], 1
test al, 2
je 0x1003d540
test edi, edi
jne 0x1003d540
mov esi, dword [esp + 4]
mov ecx, esi
call fcn.1002a4a0
xor edi, edi
cmp dword [esi + 0x70], 0
je 0x1003d82f
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 8]
mov edx, dword [eax + 0xc]
call fcn.10002c70
mov ecx, dword [esp + 4]
test eax, eax
mov dword [ecx + 0x10], eax
je 0x1003dce1
mov ecx, dword [esp + 0x18]
push dword [ecx + 8]
push dword [ecx]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0x18]
mov byte [eax], 3
movsd xmm0, qword [ecx + 8]
movsd qword [eax + 0x38], xmm0
jmp 0x1003d540
cmp word [edx + 0x32], 0
mov ebx, dword [esp + 0x18]
je 0x1003d453
mov eax, dword [ebx + 0x20]
mov ecx, dword [esp + 4]
add eax, dword [ebx + 0x1c]
cmp dword [ecx + 0x2c], eax
jne 0x1003d453
mov ecx, dword [esp + 4]
mov edx, ebx
jmp 0x1003d658
lea ecx, [eax + esi]
mov eax, ebx
cmp ebx, 0x3fff
ja 0x1003dc80
shr eax, 7
mov edx, ebx
mov edi, 2
or al, 0x80
and dl, 0x7f
mov byte [ecx], al
mov byte [ecx + 1], dl
add edi, esi
mov esi, dword [esp + 0xc]
jmp 0x1003d5e9
mov dword [esp + 0x6c], 0
jmp 0x1003d6d9
mov edi, dword [eax + 0x28]
test edi, edi
jne 0x1003dd16
mov edx, dword [eax + 0x94]
cmp edx, dword [eax + 0x98]
ja 0x1003dc96
call fcn.10029840
jmp 0x1003d6c7
mov eax, dword [esp + 4]
cmp byte [eax], 2
jae 0x1003dcbd
mov ecx, edx
call fcn.10044b10
mov edx, dword [esp + 8]
test eax, eax
mov dword [esp + 0x6c], eax
je 0x1003d468
jmp 0x1003d65d
mov dword [esp + 0x10], ebx
movzx ebx, word [edx + 0x10]
mov eax, esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x20], ebx
sub eax, ebx
mov ebx, dword [edx + 0x34]
xor edx, edx
mov esi, dword [ebx + 0x28]
add esi, 0xfffffffc
div esi
mov eax, dword [esp + 0x20]
mov dword [esp + 0x24], 0
mov dword [esp + 0x30], ebx
add edx, eax
cmp edx, ecx
cmovg edx, eax
lea ecx, [edx + edi]
lea eax, [edx + edi + 4]
mov edi, dword [esp + 0x14]
add ecx, dword [esp + 0xc]
mov dword [esp + 0x20], eax
lea eax, [esp + 0x74]
mov dword [eax], 0
mov dword [esp + 0x38], ecx
mov esi, dword [esp + 0x28]
mov dword [esp + 0x2c], edx
cmp esi, edx
cmovg esi, edx
cmp dword [esp + 0x1c], esi
jl 0x1003dcad
push esi
push edi
push dword [esp + 0x18]
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov ebx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
sub ebx, esi
jle 0x1003db14
add dword [esp + 0x10], esi
sub dword [esp + 0x1c], esi
add edi, esi
sub edx, esi
mov dword [esp + 0x28], ebx
jne 0x1003d95c
mov eax, dword [esp + 0x30]
mov dword [esp + 0x70], 0
mov esi, dword [esp + 0x74]
mov dword [esp + 0x14], edi
cmp byte [eax + 0x11], 0
mov dword [esp + 0x10], esi
je 0x1003da4d
mov ecx, dword [0x101d2678]
mov ebx, dword [esp + 0x10]
jmp 0x1003da1b
mov edx, dword [esp + 0x30]
mov eax, 0xcccccccd
mul dword [edx + 0x28]
lea eax, [esi - 1]
mov dword [esp + 0x2c], eax
mov edi, edx
xor edx, edx
shr edi, 2
inc edi
div edi
mov edi, dword [esp + 0x30]
mov eax, ecx
sub dword [esp + 0x2c], edx
xor edx, edx
div dword [edi + 0x24]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x2c]
xor edx, edx
lea edi, [eax + 1]
cmp edi, dword [esp + 0x3c]
mov edi, dword [esp + 0x14]
sete dl
lea eax, [edx + eax + 2]
jmp 0x1003da25
mov esi, ebx
inc ebx
xor eax, eax
cmp ebx, 2
jae 0x1003d9d1
cmp ebx, eax
je 0x1003da1b
mov dword [esp + 0x2c], ebx
mov eax, ecx
mov ebx, ecx
mov ecx, edi
mov edi, dword [esp + 0x30]
xor edx, edx
div dword [edi + 0x24]
mov edi, ecx
mov ecx, ebx
mov ebx, dword [esp + 0x2c]
cmp esi, eax
je 0x1003da1b
inc esi
mov dword [esp + 0x74], esi
mov ecx, dword [esp + 0x30]
lea edx, [esp + 0x70]
push 0
push esi
mov esi, ecx
lea eax, [esp + 0x7c]
push eax
call fcn.1002aeb0
add esp, 0xc
mov edi, eax
test eax, eax
mov dword [esp + 0x40], eax
jne 0x1003dca0
cmp byte [esi + 0x11], 0
je 0x1003dca0
mov ebx, dword [esp + 0x10]
mov edx, dword [esp + 0x74]
mov ecx, esi
mov eax, 4
lea edi, [esp + 0x40]
cmp ebx, 1
mov esi, edx
sbb eax, 0
push edi
push ebx
push eax
call fcn.1002c340
add esp, 0xc
mov edi, dword [esp + 0x40]
test edi, edi
jne 0x1003dcf3
push esi
call sub.api_ms_win_crt_utility_l1_1_0.dll__byteswap_ulong
add esp, 4
mov ecx, dword [esp + 0x38]
mov dword [ecx], eax
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x1003db00
mov edi, dword [esp + 0x70]
mov esi, dword [edi + 0x38]
push 0
call sub.api_ms_win_crt_utility_l1_1_0.dll__byteswap_ulong
add esp, 4
mov ebx, dword [esp + 0x30]
mov dword [esi], eax
mov dword [esp + 0x24], edi
mov dword [esp + 0x38], esi
mov eax, dword [edi + 0x38]
mov edi, dword [esp + 0x14]
mov edx, dword [ebx + 0x28]
add eax, 4
mov dword [esp + 0x10], eax
add edx, 0xfffffffc
jmp 0x1003d95c
mov ecx, dword [eax + 0x48]
test byte [ecx + 0x1c], 0x20
jne 0x1003dd30
call fcn.10025e90
jmp 0x1003dac8
mov eax, dword [esp + 0x24]
mov esi, dword [esp + 4]
test eax, eax
je 0x1003d4e1
mov ecx, dword [eax + 0x48]
call fcn.10025e10
jmp 0x1003d4e1
mov eax, dword [edi]
mov edx, dword [esp + 0xc]
mov dword [edx], eax
jmp 0x1003d70e
movzx ecx, word [esp + 0x50]
cmp dword [esp + 0x4c], ecx
jne 0x1003d739
mov ecx, dword [esp + 0x34]
cmp byte [ecx + 0x11], 0
je 0x1003db65
movzx ecx, word [esi + 0x10]
cmp dword [esp + 0x20], ecx
jge 0x1003d739
mov eax, dword [esi + 0x38]
movzx ecx, byte [esi + 9]
lea eax, [eax + ecx + 0xa]
cmp edi, eax
jae 0x1003dd8a
push 0x101b128f
push 0x11f58
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.nss3.dll_sqlite3_log
add esp, 0x14
mov edi, 0xb
jmp 0x1003d540
sar eax, 0x1f
mov edx, ebx
push eax
call fcn.10042820
mov edx, dword [esp + 0xc]
add esp, 4
movzx edi, al
jmp 0x1003d689
mov edi, dword [ecx + 4]
jmp 0x1003d540
add ebx, esi
push edi
push 0
push ebx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
jmp 0x1003d4dd
xor eax, eax
cmp dword [ebp + 8], 0
mov edx, dword [edi]
mov ecx, dword [esp + 4]
lea esi, [esp + 0x68]
setne al
push esi
push eax
push dword [edi + 0xc]
push dword [edi + 8]
call fcn.10042710
jmp 0x1003d432
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov dword [esp + 8], ecx
mov ecx, dword [esp + 4]
mov dword [esp + 0xc], eax
mov edx, dword [ecx + 0x40]
mov byte [esi + 0xb], 0
mov edi, dword [esi + 4]
mov edi, dword [edi + 8]
test edi, edi
je 0x1003d55f
test byte [edi + 1], 0x10
je 0x1003dc49
mov byte [esi + 0xb], 1
cmp dword [edi + 0x40], edx
jne 0x1003dc49
mov eax, dword [edi + 0x20]
mov ecx, dword [edi + 0x24]
xor eax, dword [esp + 8]
xor ecx, dword [esp + 0xc]
or ecx, eax
jne 0x1003dc49
mov byte [edi], 1
mov edi, dword [edi + 0x18]
jmp 0x1003dc1d
mov esi, 0x3fff
cmp esi, edx
sbb ebx, eax
jb 0x1003dc70
mov eax, edx
and dl, 0x7f
add edi, 2
shr eax, 7
or al, 0x80
mov byte [ecx], al
mov byte [ecx + 1], dl
jmp 0x1003d60f
push eax
call fcn.10042820
add esp, 4
add edi, eax
jmp 0x1003d60f
sar eax, 0x1f
mov edx, ebx
push eax
call fcn.10042820
add esp, 4
movzx edi, al
jmp 0x1003d89b
call fcn.100295e0
jmp 0x1003d6c7
test edi, edi
jne 0x1003dd03
mov esi, dword [esp + 0x74]
jmp 0x1003dab1
cmp dword [esp + 0x1c], 0
jle 0x1003dd1f
mov esi, dword [esp + 0x1c]
jmp 0x1003d973
mov edi, 0xb
push 0x101b128f
push 0x11f2a
push str.database_corruption
push str._s_at_line__d_of___.10s_
push edi
call sym.nss3.dll_sqlite3_log
add esp, 0x14
jmp 0x1003dd16
mov dword [esp + 0x6c], 7
mov edi, 7
jmp 0x1003d82f
mov eax, dword [esp + 0x70]
test eax, eax
je 0x1003dd03
mov ecx, dword [eax + 0x48]
call fcn.10025e10
cmp dword [esp + 0x24], 0
je 0x1003dd16
mov eax, dword [esp + 0x24]
mov ecx, dword [eax + 0x48]
call fcn.10025e10
mov dword [esp + 0x6c], edi
jmp 0x1003d540
push esi
push 0
push dword [esp + 0x18]
call sub.VCRUNTIME140.dll_memset
jmp 0x1003d97e
mov esi, dword [ecx + 0x14]
dec dword [esi + 0x78]
mov eax, dword [esi + 0x88]
mov dword [ecx + 0x10], eax
mov dword [esi + 0x88], ecx
mov edx, dword [esi + 0x98]
mov esi, dword [esi + 0x3c]
mov eax, dword [ecx + 0x18]
mov ebx, dword [ecx + 4]
mov ecx, dword [esi]
mov edi, edx
dec eax
mov dword [esp + 0x24], ebx
sar edi, 0x1f
imul edi, eax
mul edx
add edx, edi
mov dword [esp + 0x10], eax
mov ecx, dword [ecx + 0x48]
mov edi, edx
call dword [section..00cfg]
push dword [esp + 0x24]
push edi
push dword [esp + 0x18]
push esi
call ecx
add esp, 0x10
jmp 0x1003dac8
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 8]
add eax, edi
cmp eax, dword [ecx + 0x3c]
jbe 0x1003dda8
push 0x101b128f
push 0x11f5b
jmp 0x1003db82
push dword [esp + 0x20]
push dword [esp + 0x10]
push edi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
xor edi, edi
jmp 0x1003d540