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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3c
mov eax, dword [0x559940]
xor eax, esp
mov dword [esp + 0x38], eax
push ebx
mov ebx, dword [ebp + 8]
mov dword [esp + 0x18], edx
push esi
push edi
mov edi, ecx
mov dword [esp + 0x24], edi
lea eax, [edi + 0x20]
mov dword [esp + 0x18], eax
cmp ebx, 2
jae 0x41d564
xor ecx, ecx
jmp 0x41d59d
mov eax, 0xcccccccd
lea esi, [ebx - 2]
mul dword [edi + 0x24]
mov eax, esi
mov ecx, edx
xor edx, edx
shr ecx, 2
inc ecx
div ecx
mov eax, dword [0x55b1cc]
lea ecx, [edi + 0x20]
sub esi, edx
xor edx, edx
div dword [ecx]
xor ecx, ecx
dec eax
cmp esi, eax
lea eax, [edi + 0x20]
mov dword [esp + 0x18], eax
sete cl
add ecx, 2
add ecx, esi
mov esi, dword [ebp + 0xc]
cmp ecx, ebx
je 0x41d8ea
mov ecx, dword [esp + 0x18]
xor edx, edx
mov eax, dword [0x55b1cc]
div dword [ecx]
inc eax
cmp ebx, eax
je 0x41d8ea
mov eax, dword [edi + 0xc]
mov eax, dword [eax + 0x38]
mov eax, dword [eax + 0x24]
bswap eax
test eax, eax
jne 0x41d5e4
mov eax, 0x65
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x38]
xor ecx, esp
call fcn.004f49c2
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x3c]
mov edx, ebx
push eax
lea eax, [esp + 0x14]
mov ecx, edi
push eax
call fcn.0041a190
add esp, 8
test eax, eax
jne 0x41d94c
mov eax, dword [esp + 0x10]
cmp al, 1
jne 0x41d63f
push 0x54b514
push 0xf747
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.00407d30
add esp, 0x14
mov eax, 0xb
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x38]
xor ecx, esp
call fcn.004f49c2
mov esp, ebp
pop ebp
ret
cmp al, 2
jne 0x41d6d0
test esi, esi
jne 0x41d94a
push 1
lea eax, [esp + 0x2c]
mov ecx, edi
push ebx
push eax
lea edx, [esp + 0x1c]
call fcn.0041fc40
add esp, 0xc
test eax, eax
jne 0x41d94c
mov edx, dword [esp + 0x10]
test edx, edx
je 0x41d8ee
mov edx, dword [edx + 0x48]
test byte [edx + 0x1c], 0x20
je 0x41d6c4
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.004f4a20
push edx
push eax
mov eax, dword [edi + 0x48]
push esi
call eax
add esp, 0x10
jmp 0x41d8ee
mov ecx, edx
call fcn.0040f8d0
jmp 0x41d8ee
mov eax, dword [edi]
lea ecx, [esp + 0x40]
push 0
push ecx
push ebx
push eax
mov eax, dword [eax + 0xc8]
call eax
add esp, 0x10
test eax, eax
jne 0x41d94c
mov edx, dword [esp + 0x40]
mov ecx, dword [edx + 8]
mov dword [esp + 0x1c], ecx
lea eax, [ecx + 0x48]
mov dword [esp + 0x14], eax
cmp ebx, dword [ecx + 4]
je 0x41d723
mov eax, dword [edx + 4]
cmp ebx, 1
mov dword [ecx + 0x38], eax
setne al
mov dword [ecx + 0x48], edx
dec al
mov dword [ecx + 0x34], edi
and al, 0x64
mov dword [ecx + 4], ebx
mov byte [ecx + 9], al
jmp 0x41d727
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x20]
xor eax, eax
test esi, esi
setne dl
cmovne ecx, eax
dec dl
mov dword [esp + 0x34], ecx
and dl, 2
mov dword [esp + 0x38], edx
push edx
push ecx
lea eax, [esp + 0x38]
mov ecx, edi
push eax
lea edx, [esp + 0x38]
call fcn.0041fc40
add esp, 0xc
mov dword [esp + 0x28], eax
test eax, eax
jne 0x41d86e
mov edx, dword [esp + 0x2c]
test edx, edx
je 0x41d7c1
mov edx, dword [edx + 0x48]
test byte [edx + 0x1c], 0x20
je 0x41d7ba
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.004f4a20
push edx
push eax
mov eax, dword [edi + 0x48]
push esi
call eax
mov edi, dword [esp + 0x34]
add esp, 0x10
mov esi, dword [ebp + 0xc]
jmp 0x41d7c1
mov ecx, edx
call fcn.0040f8d0
mov eax, dword [esp + 0x30]
test esi, esi
je 0x41d7db
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
cmp eax, dword [esp + 0x20]
ja 0x41d742
mov edx, dword [esp + 0x1c]
mov ecx, edi
push esi
push eax
push dword [esp + 0x44]
push dword [esp + 0x1c]
call fcn.0041d2e0
mov edi, eax
add esp, 0x10
mov eax, dword [esp + 0x14]
mov dword [esp + 0x1c], edi
mov edx, dword [eax]
test byte [edx + 0x1c], 0x20
je 0x41d84b
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.004f4a20
push edx
push eax
mov eax, dword [edi + 0x48]
push esi
call eax
mov esi, dword [ebp + 0xc]
add esp, 0x10
mov edi, dword [esp + 0x1c]
jmp 0x41d852
mov ecx, edx
call fcn.0040f8d0
test edi, edi
je 0x41d8ea
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x38]
xor ecx, esp
call fcn.004f49c2
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x14]
mov edx, dword [eax]
test byte [edx + 0x1c], 0x20
je 0x41d8cd
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.004f4a20
push edx
push eax
mov eax, dword [edi + 0x48]
push esi
call eax
mov eax, dword [esp + 0x38]
add esp, 0x10
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x38]
xor ecx, esp
call fcn.004f49c2
mov esp, ebp
pop ebp
ret
mov ecx, edx
call fcn.0040f8d0
mov eax, dword [esp + 0x28]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x38]
xor ecx, esp
call fcn.004f49c2
mov esp, ebp
pop ebp
ret
test esi, esi
jne 0x41d94a
mov ecx, dword [esp + 0x18]
xor edx, edx
mov eax, dword [0x55b1cc]
mov edi, dword [esp + 0x24]
div dword [ecx]
inc eax
mov dword [esp + 0x10], eax
dec ebx
cmp ebx, eax
je 0x41d904
cmp ebx, 2
jae 0x41d912
xor eax, eax
jmp 0x41d93b
mov eax, 0xcccccccd
lea esi, [ebx - 2]
mul dword [edi + 0x24]
mov eax, esi
mov ecx, edx
xor edx, edx
shr ecx, 2
inc ecx
div ecx
sub esi, edx
lea eax, [esi + 2]
sub eax, dword [esp + 0x10]
neg eax
sbb eax, eax
add eax, 3
add eax, esi
cmp eax, ebx
mov eax, dword [esp + 0x10]
je 0x41d904
mov byte [edi + 0x13], 1
mov dword [edi + 0x2c], ebx
xor eax, eax
mov ecx, dword [esp + 0x44]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004f49c2
mov esp, ebp
pop ebp
ret