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

Disassembly:
sub esp, 0x68
mov eax, dword [0x10165004]
xor eax, esp
mov dword [esp + 0x64], eax
push ebx
push ebp
push esi
mov esi, dword [esp + 0x78]
push edi
mov edi, edx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x20], edi
mov dword [esp + 0x2c], esi
cmp word [edi + 0x18], 0
mov ebp, dword [edi + 0x34]
jne 0x1003bf14
push 0x10156dc4
push 0x1291d
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10021520
add esp, 0x14
mov eax, 0xb
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.10129131
add esp, 0x68
ret
push 0
lea eax, [esp + 0x2c]
mov ecx, ebp
push 0
push eax
lea edx, [esp + 0x20]
call fcn.1003a240
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x1003c0a7
mov eax, dword [edi + 0x24]
add esi, 4
push eax
mov dword [esp + 0x1c], eax
mov eax, dword [edi + 0x4c]
push edi
call eax
mov edi, dword [esp + 0x1c]
lea edx, [ebx + 0xd]
movzx eax, ax
mov ecx, edi
mov dword [esp + 0x24], eax
call fcn.10035c60
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x20]
mov dword [esp + 0x40], ecx
xor edx, edx
lea ecx, [esp + 0x24]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x44], ecx
lea ecx, [esp + 0x38]
mov eax, dword [eax + 0x3c]
push edi
push 1
mov dword [esp + 0x40], 1
mov dword [esp + 0x50], eax
mov dword [esp + 0x68], 2
call fcn.1003b7a0
mov ebx, eax
add esp, 0x10
mov dword [esp + 0x14], ebx
test ebx, ebx
je 0x1003bfb2
test edi, edi
je 0x1003c0a7
jmp 0x1003c09f
movzx eax, word [edi + 0x12]
mov ecx, dword [ebp + 0x28]
sub ecx, eax
movzx eax, word [esp + 0x1c]
sub ecx, eax
sub ecx, 2
mov dword [edi + 0x14], ecx
cmp byte [ebp + 0x11], 0
je 0x1003c00e
mov edx, dword [esp + 0x28]
lea eax, [esp + 0x14]
push eax
mov eax, dword [esp + 0x28]
mov ecx, ebp
push dword [eax + 4]
push 5
call fcn.10034750
mov ax, word [esp + 0x28]
add esp, 0xc
cmp ax, word [edi + 0x10]
jbe 0x1003c00a
lea eax, [esp + 0x14]
mov edx, edi
push eax
push dword [esp + 0x1c]
mov ecx, edi
call fcn.10034e40
add esp, 8
mov ebx, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
movzx ecx, word [edx + 0x18]
mov eax, dword [edx + 0x40]
mov ax, word [eax + ecx*2 - 2]
mov ch, al
mov cl, ah
movzx eax, word [edx + 0x1a]
movzx ecx, cx
and ecx, eax
add ecx, dword [edx + 0x38]
mov dword [esp + 0x18], ecx
mov edx, ecx
lea ebp, [ecx + 9]
mov al, byte [ecx]
lea ecx, [edx + 1]
mov dword [esp + 0x18], ecx
test al, al
jns 0x1003c04a
mov edx, ecx
cmp ecx, ebp
jb 0x1003c037
lea ebp, [ecx + 9]
mov edx, ecx
nop
mov al, byte [ecx]
lea ecx, [edx + 1]
mov byte [esi], al
inc esi
mov dword [esp + 0x18], ecx
test al, al
jns 0x1003c066
mov edx, ecx
cmp ecx, ebp
jb 0x1003c050
mov ebp, dword [esp + 0x24]
test ebx, ebx
jne 0x1003c08e
mov eax, dword [esp + 0x20]
mov ecx, ebp
movzx edx, word [ebp + 0x18]
push dword [eax + 4]
mov eax, dword [esp + 0x30]
sub esi, eax
push ebx
push esi
push eax
call fcn.1003b430
add esp, 0x10
mov ebx, eax
movzx ecx, byte [ebp + 9]
mov eax, dword [ebp + 0x38]
mov edx, dword [esp + 0x28]
bswap edx
mov dword [ecx + eax + 8], edx
mov ecx, dword [edi + 0x48]
call fcn.1002fa70
mov ecx, dword [esp + 0x74]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.10129131
add esp, 0x68
ret