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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 8
mov al, byte [ecx]
mov esi, ecx
test al, al
je 0x461c9f
cmp al, 3
jb 0x461c86
cmp al, 4
mov dword [esp + 4], 0
jne 0x461bb7
mov eax, dword [esi + 4]
test eax, eax
jne 0x461ec4
jmp 0x461c9f
mov byte [esi], 1
mov eax, dword [0x51d29c]
test eax, eax
je 0x461bdc
push 0x19a
call eax
add esp, 4
mov ecx, eax
mov eax, 0xa
test ecx, ecx
jne 0x461ec4
mov edx, dword [esi + 0x10]
lea eax, [esp + 4]
mov ecx, esi
push eax
push 0
push dword [esi + 0x3c]
push dword [esi + 0x38]
call fcn.0045fc70
add esp, 0x10
test eax, eax
jne 0x461ec4
mov edi, dword [esi + 0x10]
test edi, edi
je 0x461c5d
cmp dword [0x51d1a8], 0
je 0x461c53
mov eax, dword [0x51e858]
test eax, eax
je 0x461c21
push eax
call dword [0x51d1f8]
add esp, 4
push edi
call dword [0x51d1d4]
add esp, 4
sub dword [0x51e800], eax
dec dword [0x51e824]
push edi
call dword [0x51d1cc]
add esp, 4
mov eax, dword [0x51e858]
test eax, eax
je 0x461c5d
push eax
call dword [0x51d200]
jmp 0x461c5a
push edi
call dword [0x51d1cc]
add esp, 4
mov dword [esi + 0x10], 0
mov eax, dword [esp + 4]
test eax, eax
je 0x461c71
mov dword [esi + 4], eax
jmp 0x461c77
cmp dword [esi + 4], 0
je 0x461c84
mov al, byte [esi]
test al, al
jne 0x461c86
mov byte [esi], 2
mov al, 2
jmp 0x461c86
mov al, byte [esi]
cmp al, 1
je 0x461e5e
cmp al, 2
jne 0x461c9f
mov byte [esi], 0
cmp dword [esi + 4], 0
js 0x461ec2
mov ecx, dword [esi + 0x74]
movzx edi, word [esi + 0x46]
lea eax, [esi + 0x74]
mov dword [esp], eax
cmp byte [ecx + 8], 0
je 0x461d5d
test di, di
jne 0x461e74
jmp 0x461ce2
call fcn.00442220
movzx edi, word [esi + 0x46]
test di, di
jne 0x461e6f
movsx eax, byte [esi + 0x44]
test eax, eax
je 0x461e65
mov word [esi + 0x32], 0
and byte [esi + 1], 0xf9
movzx ecx, word [esi + eax*2 + 0x46]
dec al
mov word [esi + 0x46], cx
mov ecx, dword [esi + 0x74]
mov byte [esi + 0x44], al
movsx eax, al
mov eax, dword [esi + eax*4 + 0x78]
mov dword [esi + 0x74], eax
mov ecx, dword [ecx + 0x48]
test byte [ecx + 0x1c], 0x20
je 0x461cd0
mov ebx, dword [ecx + 0x14]
dec dword [ebx + 0x78]
mov eax, dword [ebx + 0x88]
mov dword [ecx + 0x10], eax
mov dword [ebx + 0x88], ecx
mov edi, dword [ecx + 0x18]
mov ebp, dword [ebx + 0x98]
dec edi
mov eax, edi
mul ebp
sar ebp, 0x1f
imul ebp, edi
mov edi, dword [ebx + 0x3c]
add edx, ebp
mov ebx, dword [edi]
push dword [ecx + 4]
push edx
push eax
push edi
call dword [ebx + 0x48]
add esp, 0x10
jmp 0x461cd5
movsx eax, byte [esi + 0x44]
cmp eax, 0x13
jl 0x461d8e
push 0x50d803
push 0x10f42
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.0041f100
add esp, 0x14
mov eax, 0xb
jmp 0x461ec4
mov ebx, dword [ecx + 0x40]
movzx edx, di
movzx ebp, byte [ebx + edx*2]
movzx edx, byte [ebx + edx*2 + 1]
movzx ebx, word [ecx + 0x1a]
mov ecx, dword [ecx + 0x38]
shl ebp, 8
or edx, ebp
and edx, ebx
mov edx, dword [ecx + edx]
mov ecx, dword [esi + 0x14]
mov word [esi + 0x32], 0
and byte [esi + 1], 0xf9
mov word [esi + eax*2 + 0x48], di
mov eax, dword [esi + 0x74]
movsx edi, byte [esi + 0x44]
bswap edx
mov dword [esi + edi*4 + 0x78], eax
mov word [esi + 0x46], 0
inc byte [esi + 0x44]
movzx eax, byte [esi + 2]
push eax
push esi
mov edi, dword [esp + 8]
push edi
call fcn.00460130
add esp, 0xc
test eax, eax
jne 0x461ec4
mov eax, dword [edi]
cmp byte [eax + 8], 0
jne 0x461eba
mov edi, dword [eax + 0x38]
movzx ebp, byte [eax + 9]
movzx eax, word [eax + 0x18]
movzx ecx, byte [ebp + edi + 8]
movzx ebx, byte [ebp + edi + 9]
movzx edx, byte [ebp + edi + 0xa]
movzx ebp, byte [ebp + edi + 0xb]
mov word [esi + 0x46], ax
movsx edi, byte [esi + 0x44]
cmp edi, 0x13
jge 0x461d66
shl ebx, 0x10
shl ecx, 0x18
shl edx, 8
or ecx, ebx
or edx, ecx
mov ecx, dword [esi + 0x14]
mov word [esi + 0x32], 0
and byte [esi + 1], 0xf9
mov word [esi + edi*2 + 0x48], ax
mov eax, dword [esi + 0x74]
movsx edi, byte [esi + 0x44]
or edx, ebp
mov dword [esi + edi*4 + 0x78], eax
jmp 0x461dcd
mov eax, 0x65
jmp 0x461ec4
mov byte [esi], 1
mov eax, 0x65
jmp 0x461ec4
mov eax, dword [esp]
mov ecx, dword [eax]
lea edx, [edi - 1]
xor eax, eax
mov word [esi + 0x46], dx
cmp byte [ecx + 2], 0
je 0x461ec4
cmp byte [ecx + 8], 0
jne 0x461ec4
and byte [esi + 1], 0xf1
test dx, dx
mov word [esi + 0x32], 0
je 0x461eac
cmp byte [esi], 0
jne 0x461eac
cmp byte [ecx + 8], 0
je 0x461eac
add edi, 0xfffffffe
mov word [esi + 0x46], di
jmp 0x461ec4
mov ecx, esi
add esp, 8
pop esi
pop edi
pop ebx
pop ebp
jmp fcn.00461b80
mov eax, dword [eax + 0x18]
dec eax
mov word [esi + 0x46], ax
xor eax, eax
add esp, 8
pop esi
pop edi
pop ebx
pop ebp
ret