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

Disassembly:
sub esp, 0x20
mov edx, dword [esp + 0x28]
push ebp
mov ebp, dword [esp + 0x28]
push esi
push edi
mov edi, edx
mov eax, dword [ebp]
mov esi, dword [ebp + 8]
mov dword [esp + 0x18], eax
mov eax, dword [edx + 0x28]
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x20], eax
cmp dword [edi], 0
je 0x52d4c6
cmp dword [edi + 0x1c], edx
je 0x52d4c6
mov edi, dword [edi + 0x10]
test edi, edi
jne 0x52d4b5
mov dword [esp + 0x14], edi
push ebx
test edx, edx
je 0x52d686
mov ecx, dword [esp + 0x44]
cmp ecx, eax
je 0x52d686
mov eax, dword [esp + 0x3c]
test byte [eax + 0x1c], 0x80
jne 0x52d54b
mov al, byte [ebp + 0x13]
test al, al
jne 0x52d4f8
inc dword [ebp + 0x2c]
mov ebx, dword [ebp + 0x2c]
jmp 0x52d507
dec al
mov byte [ebp + 0x13], al
movzx eax, al
mov ebx, dword [ebp + eax*4 + 0x98]
push ebx
push ecx
push 0x8d
push esi
call fcn.0052e180
push ebx
push 0
push dword [esp + 0x3c]
push 0x20
push esi
call fcn.0052e1e0
add esp, 0x24
test ebx, ebx
je 0x52d686
mov al, byte [ebp + 0x13]
cmp al, 8
jae 0x52d686
movzx eax, al
mov dword [ebp + eax*4 + 0x98], ebx
inc byte [ebp + 0x13]
jmp 0x52d686
push eax
call fcn.005229e0
mov ecx, dword [ebp + 0x2c]
add esp, 4
mov dword [esp + 0x28], eax
mov dword [esp + 0x10], 0
movzx eax, word [eax + 0x32]
lea ebx, [ecx + 1]
mov dword [esp + 0x20], eax
add ecx, eax
mov dword [esp + 0x2c], ebx
mov dword [ebp + 0x2c], ecx
test eax, eax
jle 0x52d62a
mov edi, dword [esp + 0x44]
mov dword [esp + 0x14], ebx
movzx ebx, word [edx + 0x34]
xor ecx, ecx
test ebx, ebx
jle 0x52d5b0
mov eax, dword [esp + 0x28]
mov ebp, dword [esp + 0x10]
mov edx, dword [edx + 4]
mov eax, dword [eax + 4]
movzx eax, word [eax + ebp*2]
cmp ax, word [edx]
je 0x52d5d2
inc ecx
add edx, 2
cmp ecx, ebx
jl 0x52d5a3
or eax, 0xffffffff
mov ecx, dword [esi + 0x74]
mov ebp, dword [esp + 0x14]
movsx edx, ax
cmp dword [esi + 0x78], ecx
jg 0x52d5d7
push ebp
push edx
push edi
push 0x5d
push esi
call fcn.004e2c80
add esp, 0x14
jmp 0x52d5fe
movzx eax, cx
jmp 0x52d5b3
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi + 0x70]
mov dword [eax + ecx*4], 0x5d
mov dword [eax + ecx*4 + 4], edi
mov dword [eax + ecx*4 + 8], edx
mov dword [eax + ecx*4 + 0xc], ebp
mov dword [eax + ecx*4 + 0x10], 0
mov eax, dword [esp + 0x10]
inc ebp
mov edx, dword [esp + 0x40]
inc eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ebp
cmp eax, dword [esp + 0x20]
jl 0x52d587
mov edi, dword [esp + 0x18]
mov ebp, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
mov ebx, dword [esp + 0x2c]
push eax
push ebx
push 0
push dword [esp + 0x30]
push 0x1f
push esi
call fcn.0052e310
push 0xffffffffffffffff
push str.corrupt_database
push 0
push 2
push 0xb
push 0x46
push esi
mov ebx, eax
call fcn.0052e240
mov eax, dword [ebp + 0x74]
add esp, 0x34
test eax, eax
jne 0x52d65d
mov eax, ebp
mov byte [eax + 0x15], 1
mov edx, dword [esi + 0x74]
test ebx, ebx
jns 0x52d66b
lea ebx, [edx - 1]
mov eax, dword [esi]
cmp byte [eax + 0x57], 0
je 0x52d67a
mov eax, 0x74c854
jmp 0x52d683
mov eax, dword [esi + 0x70]
lea ecx, [ebx + ebx*4]
lea eax, [eax + ecx*4]
mov dword [eax + 8], edx
mov eax, dword [esp + 0x38]
push 0
push dword [eax + 0x20]
push dword [esp + 0x24]
call fcn.00528af0
mov dword [esp + 0x4c], eax
xor ecx, ecx
mov eax, dword [esp + 0x48]
add esp, 0xc
xor ebx, ebx
cmp cx, word [eax + 0x22]
jge 0x52d729
xor ebp, ebp
mov edi, eax
mov eax, dword [edi + 4]
cmp byte [eax + ebp + 8], 0x45
jne 0x52d715
mov eax, dword [esp + 0x38]
mov ecx, dword [esi + 0x74]
mov edx, dword [eax + 0x24]
add edx, ebx
cmp dword [esi + 0x78], ecx
jg 0x52d6e2
push 0
push 0
push edx
push 0x56
push esi
call fcn.004e2c80
add esp, 0x14
jmp 0x52d715
mov edi, dword [esp + 0x3c]
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi + 0x70]
mov dword [eax + ecx*4], 0x56
mov dword [eax + ecx*4 + 4], edx
mov dword [eax + ecx*4 + 8], 0
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
movsx eax, word [edi + 0x22]
inc ebx
add ebp, 0x10
cmp ebx, eax
jl 0x52d6b5
mov edi, dword [esp + 0x18]
mov ebp, dword [esp + 0x34]
mov eax, dword [edi + 0xc]
pop ebx
test eax, eax
je 0x52d744
push 0
push 0
push eax
push dword [esp + 0x24]
call fcn.004cbb60
add esp, 0x10
jmp 0x52d746
xor eax, eax
push edi
push 0
push 0
push 2
push eax
push 0
push dword [edi + 8]
push dword [esp + 0x34]
call fcn.0050bc80
add esp, 0xc
push eax
push dword [esp + 0x54]
push ebp
call fcn.0052aab0
add esp, 0x20
pop edi
pop esi
pop ebp
add esp, 0x20
ret