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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
push edi
mov eax, dword [esi + 0x14]
mov edi, dword [esi + 0x74]
mov ecx, dword [eax + 0x24]
mov eax, 0xaaaaaaab
add ecx, ecx
mul ecx
mov ecx, edx
shr ecx, 1
xor eax, eax
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x10], eax
nop dword [eax]
cmp dword [edi + 0x14], 0
jge 0x4c0fca
push edi
call fcn.004c2e30
add esp, 4
test eax, eax
jne 0x4c1352
mov ecx, dword [ebp - 0xc]
mov al, byte [edi + 0xc]
test al, al
jne 0x4c0fda
cmp dword [edi + 0x14], ecx
jle 0x4c1352
movsx edx, byte [esi + 0x44]
mov dword [ebp - 0x14], edx
test edx, edx
jne 0x4c114c
test al, al
je 0x4c1352
mov eax, dword [esi + 0x14]
mov eax, dword [eax + 8]
test eax, eax
je 0x4c101c
nop dword [eax + eax]
cmp eax, esi
je 0x4c1015
cmp byte [eax], 0
jne 0x4c1015
mov ecx, dword [eax + 0x74]
cmp ecx, dword [esi + 0x74]
je 0x4c12ce
mov eax, dword [eax + 0x18]
test eax, eax
jne 0x4c1000
mov ecx, dword [edi + 0x48]
mov ebx, dword [edi + 0x34]
mov dword [ebp - 8], 0
mov dword [ebp - 0x14], 0
test byte [ecx + 0x1c], 4
mov edx, dword [ecx + 0x14]
mov dword [ebp - 4], ebx
je 0x4c1052
mov eax, dword [edx + 0x18]
cmp eax, dword [ecx + 0x18]
jb 0x4c1052
cmp dword [edx + 0x60], 0
je 0x4c1088
push ecx
call fcn.0051eeb0
jmp 0x4c1078
mov ebx, dword [edx + 0x28]
test ebx, ebx
jne 0x4c12f3
mov eax, dword [edx + 0x94]
push ecx
cmp eax, dword [edx + 0x98]
jbe 0x4c1073
call fcn.004d8dd0
jmp 0x4c1078
call fcn.004d9f80
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x4c12f3
mov ebx, dword [ebp - 4]
push 0
push dword [edi + 4]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 8]
push eax
push ebx
call fcn.004bf260
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
push dword [ebp - 8]
push edi
call fcn.004c8a60
mov eax, dword [ebp - 0x14]
add esp, 0x20
cmp byte [ebx + 0x11], 0
mov dword [ebp - 0x14], eax
je 0x4c10cd
lea ecx, [ebp - 4]
push ecx
push dword [edi + 4]
push 5
push eax
push ebx
call fcn.004dbdb0
add esp, 0x14
mov ebx, dword [ebp - 4]
test ebx, ebx
jne 0x4c12f3
movzx eax, byte [edi + 0xc]
mov ebx, dword [ebp - 8]
add eax, eax
push eax
lea eax, [edi + 0x1c]
push eax
lea eax, [ebx + 0x1c]
push eax
call sub.msvcrt.dll_memcpy
movzx eax, byte [edi + 0xc]
shl eax, 2
push eax
lea eax, [edi + 0x24]
push eax
lea eax, [ebx + 0x24]
push eax
call sub.msvcrt.dll_memcpy
mov al, byte [edi + 0xc]
mov byte [ebx + 0xc], al
mov eax, dword [ebx + 0x38]
movzx eax, byte [eax]
and eax, 0xfffffff7
push eax
push edi
call fcn.005323e0
movzx ecx, byte [edi + 9]
add esp, 0x20
mov eax, dword [edi + 0x38]
mov edx, dword [ebp - 0x14]
bswap edx
mov dword [ecx + eax + 8], edx
mov ecx, dword [ebp - 0xc]
mov dword [esi + 0x7c], ebx
xor ebx, ebx
xor eax, eax
mov byte [esi + 0x44], 1
mov dword [esi + 0x46], eax
mov dword [esi + 0x78], edi
mov edi, dword [esi + 0x7c]
mov dword [esi + 0x74], edi
jmp 0x4c0fb0
mov ecx, dword [esi + edx*4 + 0x74]
movzx eax, word [esi + edx*2 + 0x46]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
mov edx, dword [ecx + 0x48]
test byte [edx + 0x1c], 4
mov ebx, dword [edx + 0x14]
je 0x4c117d
mov eax, dword [ebx + 0x18]
cmp eax, dword [edx + 0x18]
jb 0x4c117d
cmp dword [ebx + 0x60], 0
je 0x4c11b6
push edx
call fcn.0051eeb0
jmp 0x4c11a6
mov ebx, dword [ebx + 0x28]
test ebx, ebx
jne 0x4c1253
mov ecx, dword [edx + 0x14]
push edx
mov eax, dword [ecx + 0x94]
cmp eax, dword [ecx + 0x98]
jbe 0x4c11a1
call fcn.004d8dd0
jmp 0x4c11a6
call fcn.004d9f80
mov ecx, dword [ebp - 8]
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x4c1253
cmp dword [ecx + 0x14], 0
jge 0x4c11d2
push ecx
call fcn.004c2e30
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x4c1253
mov ecx, dword [ebp - 8]
cmp byte [edi + 3], 0
je 0x4c120b
cmp byte [edi + 0xc], 1
jne 0x4c120b
mov ax, word [edi + 0x1c]
cmp ax, word [edi + 0x18]
jne 0x4c120b
cmp dword [ecx + 4], 1
mov ebx, dword [ebp - 4]
je 0x4c120e
movzx eax, word [ecx + 0x18]
cmp eax, ebx
jne 0x4c120e
lea eax, [ebp - 0x24]
push eax
push edi
push ecx
call fcn.004c2700
add esp, 0xc
mov ebx, eax
jmp 0x4c1253
mov ebx, dword [ebp - 4]
mov eax, dword [esi + 0x14]
push dword [eax + 0x20]
call fcn.004db060
movzx ecx, byte [esi + 3]
and ecx, 1
mov dword [ebp - 4], eax
push ecx
xor ecx, ecx
cmp dword [ebp - 0x14], 1
sete cl
push ecx
push eax
push ebx
push dword [ebp - 8]
call fcn.004c1370
mov ebx, eax
add esp, 0x18
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4c124d
push eax
call fcn.004db500
add esp, 4
mov eax, dword [ebp - 4]
mov dword [ebp - 0x10], eax
mov edx, dword [edi + 0x48]
mov byte [edi + 0xc], 0
test byte [edx + 0x1c], 0x20
je 0x4c12a2
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.00534aa0
push edx
push eax
mov eax, dword [edi + 0x48]
push esi
call eax
mov esi, dword [ebp + 8]
add esp, 0x10
jmp 0x4c12ab
push edx
call fcn.004fdee0
add esp, 4
mov cl, byte [esi + 0x44]
lea eax, [ecx - 1]
mov byte [esi + 0x44], al
movsx eax, cl
mov edi, dword [esi + eax*4 + 0x74]
mov dword [esi + 0x74], edi
test ebx, ebx
jne 0x4c1352
mov ecx, dword [ebp - 0xc]
jmp 0x4c0fb0
push 0x58efe4
push 0x11afe
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.004b99a0
add esp, 0x14
mov ebx, 0xb
jmp 0x4c1352
mov eax, dword [ebp - 8]
mov dword [esi + 0x7c], 0
test eax, eax
je 0x4c1352
mov edx, dword [eax + 0x48]
test byte [edx + 0x1c], 0x20
je 0x4c1349
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.00534aa0
push edx
push eax
mov eax, dword [edi + 0x48]
push esi
call eax
add esp, 0x10
jmp 0x4c1352
push edx
call fcn.004fdee0
add esp, 4
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4c1362
push eax
call fcn.004db500
add esp, 4
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret