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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x44
push ebx
mov ebx, ecx
mov dword [esp + 0x24], 0
and dl, 2
push esi
push edi
cmp byte [ebx], 3
mov eax, dword [ebx + 8]
mov dword [esp + 0x28], eax
mov byte [esp + 0x13], dl
mov eax, dword [eax + 4]
mov dword [esp + 0x1c], eax
jne 0x45b25f
call fcn.00451260
mov esi, eax
test esi, esi
jne 0x45b64a
mov edi, dword [ebx + 0x74]
movsx eax, byte [ebx + 0x44]
movzx ecx, word [ebx + 0x46]
mov dword [esp + 0x18], eax
mov eax, dword [edi + 0x40]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x34], edi
mov ax, word [eax + ecx*2]
mov ch, al
mov cl, ah
movzx eax, word [edi + 0x1a]
movzx ecx, cx
and ecx, eax
add ecx, dword [edi + 0x38]
cmp dword [edi + 0x14], 0
mov dword [esp + 0x14], ecx
jge 0x45b2aa
mov ecx, edi
call fcn.004524c0
test eax, eax
jne 0x45b45d
mov ecx, dword [esp + 0x14]
cmp byte [esp + 0x13], 0
je 0x45b304
cmp byte [edi + 8], 0
je 0x45b2f3
push ecx
push edi
call fcn.00451820
mov esi, dword [edi + 0x14]
add esp, 8
movzx ecx, ax
add esi, 2
add esi, ecx
mov eax, 0xaaaaaaab
mov ecx, dword [esp + 0x1c]
mov ecx, dword [ecx + 0x24]
add ecx, ecx
mul ecx
shr edx, 1
cmp esi, edx
jg 0x45b2f3
cmp word [edi + 0x18], 1
je 0x45b2f3
mov dword [esp + 0x2c], 1
jmp 0x45b304
mov ecx, ebx
call fcn.00450fe0
mov esi, eax
test esi, esi
jne 0x45b64a
cmp byte [edi + 8], 0
jne 0x45b342
and byte [ebx + 1], 0xf1
xor eax, eax
mov word [ebx + 0x32], ax
cmp byte [ebx], al
jne 0x45b333
movzx ecx, word [ebx + 0x46]
test cx, cx
je 0x45b333
mov eax, dword [ebx + 0x74]
cmp byte [eax + 8], 0
je 0x45b333
lea eax, [ecx - 1]
mov word [ebx + 0x46], ax
jmp 0x45b342
mov ecx, ebx
call fcn.00456c30
test eax, eax
jne 0x45b64c
test byte [ebx + 1], 0x20
je 0x45b362
mov edx, dword [ebx + 0x40]
mov ecx, dword [esp + 0x1c]
push ebx
call fcn.004510c0
mov esi, eax
add esp, 4
test esi, esi
jne 0x45b64a
cmp dword [ebx + 0x70], 0
jne 0x45b37f
mov edx, dword [ebx + 0x40]
mov ecx, dword [esp + 0x28]
push 0
push dword [ebx + 0x24]
push dword [ebx + 0x20]
call fcn.00450d80
add esp, 0xc
mov ecx, dword [edi + 0x48]
call fcn.0044c100
mov esi, eax
test esi, esi
jne 0x45b64a
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x38]
push eax
mov ecx, edi
call fcn.004579e0
mov edx, dword [esp + 0x24]
add esp, 4
mov dword [esp + 0x14], eax
mov ecx, edi
lea eax, [esp + 0x14]
push eax
movzx eax, word [esp + 0x4e]
push eax
call fcn.00457fd0
mov esi, dword [esp + 0x1c]
add esp, 8
test esi, esi
jne 0x45b64a
cmp byte [edi + 8], 0
jne 0x45b4e4
mov esi, dword [ebx + 0x74]
mov dword [esp + 0x28], esi
cmp dword [esi + 0x14], 0
jge 0x45b3f9
mov ecx, esi
call fcn.004524c0
mov esi, eax
test esi, esi
jne 0x45b64a
mov esi, dword [esp + 0x28]
movsx eax, byte [ebx + 0x44]
mov ecx, dword [esp + 0x18]
dec eax
cmp ecx, eax
jge 0x45b40c
mov eax, dword [ebx + ecx*4 + 0x7c]
jmp 0x45b40f
mov eax, dword [ebx + 0x74]
mov eax, dword [eax + 4]
movzx ecx, word [esi + 0x18]
mov edx, dword [esi + 0x38]
mov dword [esp + 0x24], eax
mov eax, dword [esi + 0x40]
mov ax, word [eax + ecx*2 - 2]
mov ch, al
mov cl, ah
movzx eax, word [esi + 0x1a]
movzx ecx, cx
and ecx, eax
lea eax, [edx + 4]
add ecx, edx
mov dword [esp + 0x30], ecx
cmp ecx, eax
jae 0x45b469
push 0x52a07c
push 0x11d8d
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.0043d780
add esp, 0x14
mov eax, 0xb
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x4c]
push ecx
push esi
call eax
mov ecx, dword [esi + 0x48]
add esp, 8
movzx eax, ax
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + 0x50]
mov dword [esp + 0x1c], eax
call fcn.0044c100
mov dword [esp + 0x14], eax
test eax, eax
jne 0x45b4c0
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x28]
mov eax, dword [esp + 0x30]
mov ecx, edi
push dword [esp + 0x24]
add eax, 4
push eax
mov eax, dword [esp + 0x40]
add eax, 0xfffffffc
push eax
call fcn.004580f0
add esp, 0x14
movzx edx, word [esi + 0x18]
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x2c]
dec edx
mov ecx, esi
call fcn.00457fd0
mov esi, dword [esp + 0x1c]
add esp, 8
test esi, esi
jne 0x45b64a
mov ecx, ebx
call fcn.0045a890
mov esi, eax
test esi, esi
jne 0x45b64a
movsx eax, byte [ebx + 0x44]
cmp eax, dword [esp + 0x18]
jle 0x45b5ea
mov eax, dword [ebx + 0x74]
mov edx, dword [eax + 0x48]
test byte [edx + 0x1c], 0x20
je 0x45b54e
mov eax, dword [edx + 0x14]
dec dword [eax + 0x78]
mov ecx, dword [eax + 0x88]
mov dword [edx + 0x10], ecx
mov esi, dword [eax + 0x3c]
mov dword [eax + 0x88], edx
push dword [edx + 4]
mov ecx, dword [edx + 0x18]
mov eax, dword [eax + 0x98]
dec ecx
mov edi, dword [esi]
cdq
push edx
push eax
push 0
push ecx
call fcn.00511980
push edx
push eax
mov eax, dword [edi + 0x48]
push esi
call eax
add esp, 0x10
jmp 0x45b555
mov ecx, edx
call fcn.00444eb0
dec byte [ebx + 0x44]
mov cl, byte [ebx + 0x44]
movsx eax, cl
cmp eax, dword [esp + 0x18]
jle 0x45b5cf
movsx eax, cl
dec cl
mov edx, dword [ebx + eax*4 + 0x78]
mov byte [ebx + 0x44], cl
test edx, edx
je 0x45b5c3
mov edx, dword [edx + 0x48]
test byte [edx + 0x1c], 0x20
je 0x45b5bc
mov eax, dword [edx + 0x14]
dec dword [eax + 0x78]
mov ecx, dword [eax + 0x88]
mov dword [edx + 0x10], ecx
mov esi, dword [eax + 0x3c]
mov dword [eax + 0x88], edx
push dword [edx + 4]
mov ecx, dword [edx + 0x18]
mov eax, dword [eax + 0x98]
dec ecx
mov edi, dword [esi]
cdq
push edx
push eax
push 0
push ecx
call fcn.00511980
push edx
push eax
mov eax, dword [edi + 0x48]
push esi
call eax
add esp, 0x10
jmp 0x45b5c3
mov ecx, edx
call fcn.00444eb0
mov cl, byte [ebx + 0x44]
movsx eax, cl
cmp eax, dword [esp + 0x18]
jg 0x45b564
movsx eax, cl
mov ecx, ebx
mov eax, dword [ebx + eax*4 + 0x78]
mov dword [ebx + 0x74], eax
call fcn.0045a890
mov esi, eax
test esi, esi
jne 0x45b64a
mov edi, dword [esp + 0x34]
cmp dword [esp + 0x2c], 0
je 0x45b628
mov byte [ebx], 2
movzx eax, word [edi + 0x18]
cmp dword [esp + 0x20], eax
jb 0x45b618
mov dword [ebx + 4], 0xffffffff
mov ax, word [edi + 0x18]
dec ax
mov word [ebx + 0x46], ax
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebx + 4], 1
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, ebx
call fcn.00456170
cmp byte [esp + 0x13], 0
mov esi, eax
je 0x45b642
mov ecx, ebx
call fcn.00450ed0
mov byte [ebx], 3
xor eax, eax
cmp esi, 0x10
cmove esi, eax
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret