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

Disassembly:
sub esp, 0x70
push ebx
mov ebx, edx
mov dword [esp + 0x14], ecx
push ebp
push esi
push edi
cmp word [ebx + 0x18], 0
mov ebp, dword [ebx + 0x34]
mov dword [esp + 0x1c], ebx
jne 0x420836
push 0x4e01cc
push 0x122c6
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.00407380
add esp, 0x14
mov eax, 0xb
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x70
ret
push 0
lea eax, [esp + 0x28]
mov ecx, ebp
push 0
push eax
lea edx, [esp + 0x1c]
call fcn.0041e810
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x420a50
mov eax, dword [ebx + 0x24]
mov edi, dword [esp + 0x84]
push eax
mov dword [esp + 0x18], eax
add edi, 4
mov eax, dword [ebx + 0x4c]
push ebx
call eax
mov ebx, dword [esp + 0x18]
lea edx, [esi + 0xd]
movzx eax, ax
mov ecx, ebx
mov dword [esp + 0x20], eax
call fcn.0041a460
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x1c]
mov dword [esp + 0x50], ecx
xor edx, edx
lea ecx, [esp + 0x20]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x54], ecx
lea ecx, [esp + 0x48]
mov eax, dword [eax + 0x3c]
push ebx
push 1
mov dword [esp + 0x50], 1
mov dword [esp + 0x60], eax
mov dword [esp + 0x78], 2
call fcn.004200e0
mov esi, eax
add esp, 0x10
mov dword [esp + 0x10], esi
test esi, esi
je 0x4208e7
test ebx, ebx
je 0x420a50
mov ecx, ebx
call fcn.0041a6e0
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x70
ret
movzx eax, word [ebx + 0x12]
mov ecx, dword [ebp + 0x28]
sub ecx, eax
movzx eax, word [esp + 0x18]
sub ecx, eax
sub ecx, 2
mov dword [ebx + 0x14], ecx
cmp byte [ebp + 0x11], 0
je 0x4209ae
mov edx, dword [esp + 0x24]
lea eax, [esp + 0x10]
push eax
mov eax, dword [esp + 0x24]
mov ecx, ebp
push dword [eax + 4]
push 5
call fcn.00418fa0
mov ax, word [esp + 0x24]
add esp, 0xc
mov esi, dword [esp + 0x10]
cmp ax, word [ebx + 0x10]
jbe 0x4209ae
mov ebp, dword [esp + 0x14]
test esi, esi
jne 0x4209ae
lea eax, [esp + 0x28]
push eax
mov eax, dword [ebx + 0x50]
push ebp
push ebx
call eax
movzx eax, word [esp + 0x44]
add esp, 0xc
cmp eax, dword [esp + 0x34]
jae 0x4209ae
mov ecx, dword [ebx + 0x3c]
cmp ecx, ebp
jb 0x42098a
add eax, ebp
cmp ecx, eax
jae 0x42098a
push 0x4e01cc
push 0x10aa7
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.00407380
mov esi, 0xb
add esp, 0x14
mov dword [esp + 0x10], esi
jmp 0x4209ae
mov ecx, dword [ebx + 0x34]
lea eax, [esp + 0x10]
push eax
movzx eax, word [esp + 0x3e]
push dword [ebx + 4]
push 3
mov edx, dword [eax + ebp - 4]
bswap edx
call fcn.00418fa0
mov esi, dword [esp + 0x1c]
add esp, 0xc
mov edx, dword [esp + 0x1c]
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 + 0x14], ecx
mov edx, ecx
lea ebp, [ecx + 9]
mov al, byte [ecx]
lea ecx, [edx + 1]
mov dword [esp + 0x14], ecx
test al, al
jns 0x4209ea
mov edx, ecx
cmp ecx, ebp
jb 0x4209d7
lea ebp, [ecx + 9]
mov edx, ecx
nop
mov al, byte [ecx]
lea ecx, [edx + 1]
mov byte [edi], al
inc edi
mov dword [esp + 0x14], ecx
test al, al
jns 0x420a06
mov edx, ecx
cmp ecx, ebp
jb 0x4209f0
mov ebp, dword [esp + 0x20]
test esi, esi
jne 0x420a38
movzx edx, word [ebp + 0x18]
lea eax, [esp + 0x10]
push eax
mov eax, dword [esp + 0x20]
mov ecx, ebp
push dword [eax + 4]
mov eax, dword [esp + 0x8c]
sub edi, eax
push esi
push edi
push eax
call fcn.0041fd60
mov esi, dword [esp + 0x24]
add esp, 0x14
movzx ecx, byte [ebp + 9]
mov eax, dword [ebp + 0x38]
mov edx, dword [esp + 0x24]
bswap edx
mov dword [ecx + eax + 8], edx
mov ecx, ebx
call fcn.0041a6e0
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x70
ret