Function at 0x506f00
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 0x506fb9
cmp byte [edi], 0
jne 0x506fb0
mov dl, byte [edi + 1]
test dl, 2
je 0x506fb0
mov ecx, dword [edi + 0x20]
mov eax, dword [edi + 0x24]
mov esi, dword [ebp + 0x14]
cmp ecx, ebx
jne 0x506f52
cmp eax, esi
jne 0x506f54
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 0x506fb0
jl 0x506f5c
cmp ecx, ebx
jae 0x506fb0
test dl, 8
jne 0x507028
add ecx, 1
adc eax, 0
cmp ecx, ebx
jne 0x506fb0
cmp eax, esi
jne 0x506fb0
mov eax, dword [ebp + 0x1c]
push 0
push edi
mov dword [eax], 0
call fcn.00507520
add esp, 8
test eax, eax
jne 0x506fa7
push edi
call fcn.004eefc0
add esp, 4
cmp dword [edi + 0x20], ebx
jne 0x506fb0
cmp dword [edi + 0x24], esi
jne 0x506fb0
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 0x65
jne 0x5074c4
mov dword [ebp - 0xc], 0
jmp 0x507012
mov ecx, dword [esi]
cmp word [ecx + 8], 0xd
ja 0x507007
mov eax, dword [esi + 4]
movzx ebx, word [eax + 8]
mov eax, dword [ecx + 0x10]
mov al, byte [eax]
test al, al
je 0x506fdc
test al, 2
jne 0x507007
or al, 0xff
mov dl, 1
jmp 0x506fe1
mov al, 1
or dl, 0xff
mov byte [esi + 0xc], dl
mov byte [esi + 0xd], al
test bl, 4
je 0x506ff5
mov dword [ebp - 0xc], 0x549aa0
jmp 0x50700e
test bl, 0x39
jne 0x507007
cmp dword [ecx + 0x14], 0
mov dword [ebp - 0xc], 0x549cb0
je 0x50700e
mov dword [ebp - 0xc], 0x539770
mov byte [esi + 0xb], 0
push edi
call fcn.004f3410
add esp, 4
test eax, eax
je 0x50703a
cmp eax, 0x10
jne 0x5074c4
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 0x507170
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 0x5070bf
cmp byte [eax], 0x80
jb 0x5070be
mov ecx, dword [edx + 0x3c]
lea ebx, [ebx]
inc eax
cmp eax, ecx
jae 0x507387
cmp byte [eax], 0x80
jae 0x5070b0
inc eax
lea ecx, [ebp - 0x2c]
push ecx
push eax
call fcn.00518720
mov ecx, dword [ebp - 0x28]
add esp, 8
mov eax, dword [ebp - 0x2c]
cmp ecx, dword [ebp + 0x14]
jg 0x507122
jl 0x5070e0
mov edx, dword [ebp + 0x10]
cmp eax, edx
jae 0x507125
lea edx, [ebx + 1]
mov dword [ebp - 0x14], edx
cmp edx, esi
jle 0x50713a
or edi, 0xffffffff
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x10]
cmp byte [eax + 8], 0
jne 0x507403
mov edi, dword [ebp + 8]
mov ebx, dword [ebp - 8]
movzx eax, word [ebx + 0x18]
cmp edx, eax
jl 0x50730c
movzx ecx, byte [ebx + 9]
mov eax, dword [ebx + 0x38]
mov edx, dword [ecx + eax + 8]
jmp 0x507324
mov edx, dword [ebp + 0x10]
cmp ecx, dword [ebp + 0x14]
jl 0x507151
jg 0x507130
cmp eax, edx
jbe 0x507151
mov edx, dword [ebp - 0x14]
lea esi, [ebx - 1]
cmp edx, esi
jg 0x50714a
mov eax, dword [ebp - 0x20]
lea ebx, [esi + edx]
mov edx, dword [ebp - 8]
sar ebx, 1
jmp 0x507083
mov edi, 1
jmp 0x5070ed
mov edx, dword [ebp - 8]
mov word [edi + 0x46], bx
cmp byte [edx + 8], 0
jne 0x5073b1
mov ecx, dword [ebp - 0x18]
mov edx, ebx
mov esi, dword [ebp - 0x10]
mov dword [ebp - 0x14], edx
jmp 0x507103
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 0x5071ab
push dword [ebp + 0xc]
push esi
push edx
call dword [ebp - 0xc]
add esp, 0xc
mov edi, eax
jmp 0x5072d0
mov al, byte [esi]
test al, al
js 0x5071dd
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 0x5071dd
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 0x5072d3
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 0x5074e9
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 0x5074e9
lea eax, [edi + 0x12]
cdq
push edx
push eax
call fcn.0051c920
mov esi, eax
add esp, 8
test esi, esi
je 0x5074d4
mov eax, dword [ebp + 8]
push 0
push esi
push edi
push 0
push eax
mov word [eax + 0x46], bx
call fcn.004d9640
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 0x50746c
push eax
push dword [ebp + 0xc]
push esi
push edi
call fcn.00539790
add esp, 0x10
mov edi, eax
cmp dword [0x5ac1c8], 0
je 0x5072c6
mov eax, dword [0x5b6e80]
test eax, eax
je 0x507297
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 0x5072d0
push eax
call dword [0x5ac220]
jmp 0x5072cd
push esi
call dword [0x5ac1ec]
add esp, 4
mov esi, dword [ebp + 0xc]
test edi, edi
jns 0x5072e2
mov eax, dword [ebp - 0x20]
lea edx, [ebx + 1]
mov dword [ebp - 0x14], edx
jmp 0x5072f1
jle 0x507421
mov edx, dword [ebp - 0x14]
lea eax, [ebx - 1]
mov dword [ebp - 0x20], eax
cmp edx, eax
jg 0x5070ed
mov edi, dword [ebp + 8]
lea ebx, [eax + edx]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
sar ebx, 1
jmp 0x507170
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 0x5073d3
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.004eeed0
add esp, 0x14
test eax, eax
jne 0x5074be
mov ecx, dword [ebp - 0x24]
jmp 0x507048
push 0x596084
push 0x110ce
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.004d8420
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 0x596084
push 0x10f32
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.004d8420
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 0x5074be
push 0x596084
push 0x11139
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.004d8420
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 0x5074cb
mov eax, dword [0x5b6e80]
test eax, eax
je 0x507488
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 0x5074b8
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 0x5074b5
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 0x596084
push 0x11119
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.004d8420
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