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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
test esi, esi
jne 0x506b89
cmp byte [edi], 0
jne 0x506b80
mov dl, byte [edi + 1]
test dl, 2
je 0x506b80
mov ecx, dword [edi + 0x20]
mov eax, dword [edi + 0x24]
mov esi, dword [ebp + 0x14]
cmp ecx, ebx
jne 0x506b22
cmp eax, esi
jne 0x506b24
mov eax, dword [ebp + 0x1c]
pop edi
pop esi
pop ebx
mov dword [eax], 0
xor eax, eax
mov esp, ebp
pop ebp
ret
cmp eax, esi
jg 0x506b80
jl 0x506b2c
cmp ecx, ebx
jae 0x506b80
test dl, 8
jne 0x506bf8
add ecx, 1
adc eax, 0
cmp ecx, ebx
jne 0x506b80
cmp eax, esi
jne 0x506b80
mov eax, dword [ebp + 0x1c]
push 0
push edi
mov dword [eax], 0
call fcn.005070f0
add esp, 8
test eax, eax
jne 0x506b77
push edi
call fcn.004eeba0
add esp, 4
cmp dword [edi + 0x20], ebx
jne 0x506b80
cmp dword [edi + 0x24], esi
jne 0x506b80
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 0x65
jne 0x507094
mov dword [ebp - 0xc], 0
jmp 0x506be2
mov ecx, dword [esi]
cmp word [ecx + 8], 0xd
ja 0x506bd7
mov eax, dword [esi + 4]
movzx ebx, word [eax + 8]
mov eax, dword [ecx + 0x10]
mov al, byte [eax]
test al, al
je 0x506bac
test al, 2
jne 0x506bd7
or al, 0xff
mov dl, 1
jmp 0x506bb1
mov al, 1
or dl, 0xff
mov byte [esi + 0xc], dl
mov byte [esi + 0xd], al
test bl, 4
je 0x506bc5
mov dword [ebp - 0xc], 0x549670
jmp 0x506bde
test bl, 0x39
jne 0x506bd7
cmp dword [ecx + 0x14], 0
mov dword [ebp - 0xc], 0x549880
je 0x506bde
mov dword [ebp - 0xc], 0x539360
mov byte [esi + 0xb], 0
push edi
call fcn.004f2ff0
add esp, 4
test eax, eax
je 0x506c0a
cmp eax, 0x10
jne 0x507094
mov eax, dword [ebp + 0x1c]
pop edi
pop esi
pop ebx
mov dword [eax], 0xffffffff
xor eax, eax
mov esp, ebp
pop ebp
ret
mov ecx, 1
lea ebx, [edi + 0x74]
sub ecx, dword [ebp + 0x18]
mov dword [ebp - 0x24], ecx
mov edx, dword [ebx]
xor eax, eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 8], edx
movzx esi, word [edx + 0x18]
lea eax, [edx + 0x40]
dec esi
mov dword [ebp - 0x18], eax
mov ebx, esi
mov dword [ebp - 0x20], esi
sar ebx, cl
lea ecx, [edx + 0x1a]
cmp dword [ebp - 0xc], 0
mov word [edi + 0x46], bx
mov dword [ebp - 0x10], ecx
jne 0x506d40
mov cl, byte [edx + 3]
mov eax, dword [eax]
mov dword [ebp - 0x20], eax
mov byte [ebp - 1], cl
mov ax, word [eax + ebx*2]
mov edi, dword [ebp - 0x10]
mov ch, al
mov cl, ah
movzx eax, cx
movzx ecx, word [edi]
mov edi, dword [ebp + 8]
and eax, ecx
add eax, dword [edx + 0x44]
cmp byte [ebp - 1], 0
je 0x506c8f
cmp byte [eax], 0x80
jb 0x506c8e
mov ecx, dword [edx + 0x3c]
lea ebx, [ebx]
inc eax
cmp eax, ecx
jae 0x506f57
cmp byte [eax], 0x80
jae 0x506c80
inc eax
lea ecx, [ebp - 0x2c]
push ecx
push eax
call fcn.005182f0
mov ecx, dword [ebp - 0x28]
add esp, 8
mov eax, dword [ebp - 0x2c]
cmp ecx, dword [ebp + 0x14]
jg 0x506cf2
jl 0x506cb0
mov edx, dword [ebp + 0x10]
cmp eax, edx
jae 0x506cf5
lea edx, [ebx + 1]
mov dword [ebp - 0x14], edx
cmp edx, esi
jle 0x506d0a
or edi, 0xffffffff
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x10]
cmp byte [eax + 8], 0
jne 0x506fd3
mov edi, dword [ebp + 8]
mov ebx, dword [ebp - 8]
movzx eax, word [ebx + 0x18]
cmp edx, eax
jl 0x506edc
movzx ecx, byte [ebx + 9]
mov eax, dword [ebx + 0x38]
mov edx, dword [ecx + eax + 8]
jmp 0x506ef4
mov edx, dword [ebp + 0x10]
cmp ecx, dword [ebp + 0x14]
jl 0x506d21
jg 0x506d00
cmp eax, edx
jbe 0x506d21
mov edx, dword [ebp - 0x14]
lea esi, [ebx - 1]
cmp edx, esi
jg 0x506d1a
mov eax, dword [ebp - 0x20]
lea ebx, [esi + edx]
mov edx, dword [ebp - 8]
sar ebx, 1
jmp 0x506c53
mov edi, 1
jmp 0x506cbd
mov edx, dword [ebp - 8]
mov word [edi + 0x46], bx
cmp byte [edx + 8], 0
jne 0x506f81
mov ecx, dword [ebp - 0x18]
mov edx, ebx
mov esi, dword [ebp - 0x10]
mov dword [ebp - 0x14], edx
jmp 0x506cd3
mov eax, dword [eax]
mov ax, word [eax + ebx*2]
mov ch, al
mov cl, ah
mov eax, dword [ebp - 0x10]
movzx ecx, cx
movzx eax, word [eax]
and ecx, eax
mov eax, dword [ebp - 8]
add ecx, dword [edx + 0x44]
movzx eax, byte [eax + 0xb]
movzx edx, byte [ecx]
lea esi, [ecx + 1]
cmp edx, eax
ja 0x506d7b
push dword [ebp + 0xc]
push esi
push edx
call dword [ebp - 0xc]
add esp, 0xc
mov edi, eax
jmp 0x506ea0
mov al, byte [esi]
test al, al
js 0x506dad
and edx, 0x7f
movzx eax, al
shl edx, 7
add edx, eax
mov eax, dword [ebp - 8]
movzx eax, word [eax + 0xe]
cmp edx, eax
ja 0x506dad
mov esi, dword [ebp + 0xc]
lea eax, [ecx + 2]
push esi
push eax
push edx
call dword [ebp - 0xc]
add esp, 0xc
mov edi, eax
jmp 0x506ea3
mov edx, dword [ebp - 8]
lea esi, [edi + 0x20]
push esi
movzx eax, byte [edx + 0xa]
sub ecx, eax
mov eax, dword [edx + 0x50]
push ecx
push edx
call eax
mov edi, dword [esi]
add esp, 0xc
cmp edi, 2
jl 0x5070b9
mov eax, dword [ebp + 8]
xor edx, edx
mov ecx, dword [eax + 0x14]
mov eax, edi
div dword [ecx + 0x28]
cmp eax, dword [ecx + 0x30]
ja 0x5070b9
lea eax, [edi + 0x12]
cdq
push edx
push eax
call fcn.0051c500
mov esi, eax
add esp, 8
test esi, esi
je 0x5070a4
mov eax, dword [ebp + 8]
push 0
push esi
push edi
push 0
push eax
mov word [eax + 0x46], bx
call fcn.004d9230
xor ecx, ecx
mov dword [ebp - 0x1c], eax
mov dword [esi + edi], ecx
add esp, 0x14
mov dword [esi + edi + 4], ecx
mov dword [esi + edi + 8], ecx
mov dword [esi + edi + 0xc], ecx
mov word [esi + edi + 0x10], cx
mov ecx, dword [ebp + 8]
and byte [ecx + 1], 0xfb
test eax, eax
jne 0x50703c
push eax
push dword [ebp + 0xc]
push esi
push edi
call fcn.00539380
add esp, 0x10
mov edi, eax
cmp dword [0x5ac1c8], 0
je 0x506e96
mov eax, dword [0x5b6e80]
test eax, eax
je 0x506e67
push eax
call dword [0x5ac218]
add esp, 4
push esi
call dword [0x5ac1f4]
sub dword [0x5b6e20], eax
dec dword [0x5b6e44]
push esi
call dword [0x5ac1ec]
mov eax, dword [0x5b6e80]
add esp, 8
test eax, eax
je 0x506ea0
push eax
call dword [0x5ac220]
jmp 0x506e9d
push esi
call dword [0x5ac1ec]
add esp, 4
mov esi, dword [ebp + 0xc]
test edi, edi
jns 0x506eb2
mov eax, dword [ebp - 0x20]
lea edx, [ebx + 1]
mov dword [ebp - 0x14], edx
jmp 0x506ec1
jle 0x506ff1
mov edx, dword [ebp - 0x14]
lea eax, [ebx - 1]
mov dword [ebp - 0x20], eax
cmp edx, eax
jg 0x506cbd
mov edi, dword [ebp + 8]
lea ebx, [eax + edx]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
sar ebx, 1
jmp 0x506d40
mov eax, dword [ecx]
mov ax, word [eax + edx*2]
mov ch, al
mov cl, ah
movzx eax, word [esi]
movzx ecx, cx
and ecx, eax
mov eax, dword [ebx + 0x38]
mov edx, dword [ecx + eax]
mov eax, dword [ebp - 0x14]
mov esi, dword [edi + 0x14]
movzx ecx, ax
mov al, byte [edi + 0x44]
mov word [edi + 0x46], cx
cmp al, 0x13
jge 0x506fa3
and byte [edi + 1], 0xf9
xor ebx, ebx
movsx eax, al
mov word [edi + 0x32], bx
lea ebx, [edi + 0x74]
bswap edx
mov word [edi + eax*2 + 0x48], cx
movsx ecx, byte [edi + 0x44]
mov eax, dword [ebx]
mov dword [edi + ecx*4 + 0x78], eax
xor eax, eax
inc byte [edi + 0x44]
mov word [edi + 0x46], ax
movzx eax, byte [edi + 2]
push eax
push edi
push ebx
push edx
push esi
call fcn.004eeab0
add esp, 0x14
test eax, eax
jne 0x50708e
mov ecx, dword [ebp - 0x24]
jmp 0x506c18
push 0x595f94
push 0x110ce
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.004d8010
add esp, 0x14
mov eax, 0xb
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
or byte [edi + 1], 2
mov dword [edi + 0x20], eax
xor eax, eax
mov word [edi + 0x32], ax
mov eax, dword [ebp + 0x1c]
mov dword [edi + 0x24], ecx
pop edi
pop esi
mov dword [eax], 0
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push 0x595f94
push 0x10f32
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.004d8010
add esp, 0x14
mov eax, 0xb
xor ecx, ecx
mov word [edi + 0x32], cx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
mov word [eax + 0x46], bx
mov eax, dword [ebp + 0x1c]
mov dword [eax], edi
xor eax, eax
mov edi, dword [ebp + 8]
xor ecx, ecx
mov word [edi + 0x32], cx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x1c]
mov edi, dword [ebp + 8]
mov dword [eax], 0
xor eax, eax
mov word [edi + 0x46], bx
cmp byte [esi + 0xb], al
je 0x50708e
push 0x595f94
push 0x11139
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.004d8010
add esp, 0x14
mov eax, 0xb
xor ecx, ecx
mov word [edi + 0x32], cx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [0x5ac1c8], 0
je 0x50709b
mov eax, dword [0x5b6e80]
test eax, eax
je 0x507058
push eax
call dword [0x5ac218]
add esp, 4
push esi
call dword [0x5ac1f4]
sub dword [0x5b6e20], eax
dec dword [0x5b6e44]
push esi
call dword [0x5ac1ec]
mov eax, dword [0x5b6e80]
add esp, 8
test eax, eax
je 0x507088
push eax
call dword [0x5ac220]
add esp, 4
mov eax, dword [ebp - 0x1c]
mov edi, dword [ebp + 8]
xor ecx, ecx
mov word [edi + 0x32], cx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
call dword [0x5ac1ec]
jmp 0x507085
mov edi, dword [ebp + 8]
xor ecx, ecx
mov eax, 7
mov word [edi + 0x32], cx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x595f94
push 0x11119
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.004d8010
mov edi, dword [ebp + 8]
add esp, 0x14
xor ecx, ecx
mov eax, 0xb
mov word [edi + 0x32], cx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret